[5/8] Revert "gpio: Rename free() to rfree()"

Message ID 20200219193934.28456-6-simon.k.r.goldschmidt@gmail.com
State New
Headers show
Series
  • malloc: implement USE_DL_PREFIX using inline functions
Related show

Commit Message

Simon Goldschmidt Feb. 19, 2020, 7:39 p.m.
This reverts commit 093152f275e036e54d48b3d9fc0adbc1ca4cc5b0.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
---

 drivers/gpio/gpio-rcar.c   | 2 +-
 drivers/gpio/gpio-uclass.c | 8 ++++----
 include/asm-generic/gpio.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

Comments

Simon Glass Feb. 20, 2020, 3:05 a.m. | #1
On Wed, 19 Feb 2020 at 12:40, Simon Goldschmidt
<simon.k.r.goldschmidt at gmail.com> wrote:
>
> This reverts commit 093152f275e036e54d48b3d9fc0adbc1ca4cc5b0.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> ---
>
>  drivers/gpio/gpio-rcar.c   | 2 +-
>  drivers/gpio/gpio-uclass.c | 8 ++++----
>  include/asm-generic/gpio.h | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Patch

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 9dc4cd6042..25bbbcde4b 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -130,7 +130,7 @@  static int rcar_gpio_free(struct udevice *dev, unsigned offset)
 
 static const struct dm_gpio_ops rcar_gpio_ops = {
 	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.free			= rcar_gpio_free,
 	.direction_input	= rcar_gpio_direction_input,
 	.direction_output	= rcar_gpio_direction_output,
 	.get_value		= rcar_gpio_get_value,
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 0a22441d38..90fbed455b 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -364,8 +364,8 @@  int _dm_gpio_free(struct udevice *dev, uint offset)
 	uc_priv = dev_get_uclass_priv(dev);
 	if (!uc_priv->name[offset])
 		return -ENXIO;
-	if (gpio_get_ops(dev)->rfree) {
-		ret = gpio_get_ops(dev)->rfree(dev, offset);
+	if (gpio_get_ops(dev)->free) {
+		ret = gpio_get_ops(dev)->free(dev, offset);
 		if (ret)
 			return ret;
 	}
@@ -1043,8 +1043,8 @@  static int gpio_post_bind(struct udevice *dev)
 	if (!reloc_done) {
 		if (ops->request)
 			ops->request += gd->reloc_off;
-		if (ops->rfree)
-			ops->rfree += gd->reloc_off;
+		if (ops->free)
+			ops->free += gd->reloc_off;
 		if (ops->direction_input)
 			ops->direction_input += gd->reloc_off;
 		if (ops->direction_output)
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 05777e6afe..d6cf18744f 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -248,7 +248,7 @@  int gpio_xlate_offs_flags(struct udevice *dev, struct gpio_desc *desc,
  */
 struct dm_gpio_ops {
 	int (*request)(struct udevice *dev, unsigned offset, const char *label);
-	int (*rfree)(struct udevice *dev, unsigned int offset);
+	int (*free)(struct udevice *dev, unsigned offset);
 	int (*direction_input)(struct udevice *dev, unsigned offset);
 	int (*direction_output)(struct udevice *dev, unsigned offset,
 				int value);