提交 093152f2 编写于 作者: S Simon Glass

gpio: Rename free() to rfree()

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: NSimon Glass <sjg@chromium.org>
上级 94474b25
...@@ -128,7 +128,7 @@ static int rcar_gpio_free(struct udevice *dev, unsigned offset) ...@@ -128,7 +128,7 @@ static int rcar_gpio_free(struct udevice *dev, unsigned offset)
static const struct dm_gpio_ops rcar_gpio_ops = { static const struct dm_gpio_ops rcar_gpio_ops = {
.request = rcar_gpio_request, .request = rcar_gpio_request,
.free = rcar_gpio_free, .rfree = rcar_gpio_free,
.direction_input = rcar_gpio_direction_input, .direction_input = rcar_gpio_direction_input,
.direction_output = rcar_gpio_direction_output, .direction_output = rcar_gpio_direction_output,
.get_value = rcar_gpio_get_value, .get_value = rcar_gpio_get_value,
......
...@@ -364,8 +364,8 @@ int _dm_gpio_free(struct udevice *dev, uint offset) ...@@ -364,8 +364,8 @@ int _dm_gpio_free(struct udevice *dev, uint offset)
uc_priv = dev_get_uclass_priv(dev); uc_priv = dev_get_uclass_priv(dev);
if (!uc_priv->name[offset]) if (!uc_priv->name[offset])
return -ENXIO; return -ENXIO;
if (gpio_get_ops(dev)->free) { if (gpio_get_ops(dev)->rfree) {
ret = gpio_get_ops(dev)->free(dev, offset); ret = gpio_get_ops(dev)->rfree(dev, offset);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -1043,8 +1043,8 @@ static int gpio_post_bind(struct udevice *dev) ...@@ -1043,8 +1043,8 @@ static int gpio_post_bind(struct udevice *dev)
if (!reloc_done) { if (!reloc_done) {
if (ops->request) if (ops->request)
ops->request += gd->reloc_off; ops->request += gd->reloc_off;
if (ops->free) if (ops->rfree)
ops->free += gd->reloc_off; ops->rfree += gd->reloc_off;
if (ops->direction_input) if (ops->direction_input)
ops->direction_input += gd->reloc_off; ops->direction_input += gd->reloc_off;
if (ops->direction_output) if (ops->direction_output)
......
...@@ -248,7 +248,7 @@ int gpio_xlate_offs_flags(struct udevice *dev, struct gpio_desc *desc, ...@@ -248,7 +248,7 @@ int gpio_xlate_offs_flags(struct udevice *dev, struct gpio_desc *desc,
*/ */
struct dm_gpio_ops { struct dm_gpio_ops {
int (*request)(struct udevice *dev, unsigned offset, const char *label); 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_input)(struct udevice *dev, unsigned offset);
int (*direction_output)(struct udevice *dev, unsigned offset, int (*direction_output)(struct udevice *dev, unsigned offset,
int value); int value);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册