Commit 12610be3 authored by Linus Walleij's avatar Linus Walleij Committed by Grant Likely

gpio/74x164: fix clash with gpiolib namespace

The 74x164 GPIO driver has a static inline helper called
gpio_to_chip which clashes with the gpiolib namespace if we
try to expose the function with the same name from gpiolib,
and it's still confusing even if we don't do that. So rename
it to gpio_to_74x164_chip().
Reported-by: default avatarH Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 5523f86b
...@@ -23,7 +23,7 @@ struct gen_74x164_chip { ...@@ -23,7 +23,7 @@ struct gen_74x164_chip {
u8 port_config; u8 port_config;
}; };
static struct gen_74x164_chip *gpio_to_chip(struct gpio_chip *gc) static struct gen_74x164_chip *gpio_to_74x164_chip(struct gpio_chip *gc)
{ {
return container_of(gc, struct gen_74x164_chip, gpio_chip); return container_of(gc, struct gen_74x164_chip, gpio_chip);
} }
...@@ -36,7 +36,7 @@ static int __gen_74x164_write_config(struct gen_74x164_chip *chip) ...@@ -36,7 +36,7 @@ static int __gen_74x164_write_config(struct gen_74x164_chip *chip)
static int gen_74x164_get_value(struct gpio_chip *gc, unsigned offset) static int gen_74x164_get_value(struct gpio_chip *gc, unsigned offset)
{ {
struct gen_74x164_chip *chip = gpio_to_chip(gc); struct gen_74x164_chip *chip = gpio_to_74x164_chip(gc);
int ret; int ret;
mutex_lock(&chip->lock); mutex_lock(&chip->lock);
...@@ -49,7 +49,7 @@ static int gen_74x164_get_value(struct gpio_chip *gc, unsigned offset) ...@@ -49,7 +49,7 @@ static int gen_74x164_get_value(struct gpio_chip *gc, unsigned offset)
static void gen_74x164_set_value(struct gpio_chip *gc, static void gen_74x164_set_value(struct gpio_chip *gc,
unsigned offset, int val) unsigned offset, int val)
{ {
struct gen_74x164_chip *chip = gpio_to_chip(gc); struct gen_74x164_chip *chip = gpio_to_74x164_chip(gc);
mutex_lock(&chip->lock); mutex_lock(&chip->lock);
if (val) if (val)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment