gpio: Rename free() to rfree()
authorSimon Glass <sjg@chromium.org>
Wed, 5 Feb 2020 03:15:17 +0000 (20:15 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Feb 2020 02:33:46 +0000 (19:33 -0700)
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/gpio/gpio-rcar.c
drivers/gpio/gpio-uclass.c
include/asm-generic/gpio.h

index 594e0a470a99c92f9b912e61a4dd6e591337d917..a8c5b7f879dba9a3bf5f900008b4800c19322024 100644 (file)
@@ -128,7 +128,7 @@ static int rcar_gpio_free(struct udevice *dev, unsigned offset)
 
 static const struct dm_gpio_ops rcar_gpio_ops = {
        .request                = rcar_gpio_request,
-       .free                   = rcar_gpio_free,
+       .rfree                  = rcar_gpio_free,
        .direction_input        = rcar_gpio_direction_input,
        .direction_output       = rcar_gpio_direction_output,
        .get_value              = rcar_gpio_get_value,
index 90fbed455b8da8269f49a3062032e199dab2beb7..0a22441d38a4eeb99818b45ba80dbc2430809386 100644 (file)
@@ -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)->free) {
-               ret = gpio_get_ops(dev)->free(dev, offset);
+       if (gpio_get_ops(dev)->rfree) {
+               ret = gpio_get_ops(dev)->rfree(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->free)
-                       ops->free += gd->reloc_off;
+               if (ops->rfree)
+                       ops->rfree += gd->reloc_off;
                if (ops->direction_input)
                        ops->direction_input += gd->reloc_off;
                if (ops->direction_output)
index d6cf18744fda47e2103a597677c9bf560c00022f..05777e6afe0066aaa6c2fe476da52c3867932808 100644 (file)
@@ -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 (*free)(struct udevice *dev, unsigned offset);
+       int (*rfree)(struct udevice *dev, unsigned int offset);
        int (*direction_input)(struct udevice *dev, unsigned offset);
        int (*direction_output)(struct udevice *dev, unsigned offset,
                                int value);