summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-of.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2022-11-15 11:16:24 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2022-11-15 11:16:44 +0100
commit07445ae1c26367928311e13f2a821ae94410da7e (patch)
tree4bb80232c56b627aa1cb6336e315538bc35220f5 /drivers/gpio/gpiolib-of.h
parent8dab99c9eab3162bfb4326c35579a3388dbf68f2 (diff)
downloadlinux-07445ae1c26367928311e13f2a821ae94410da7e.tar.bz2
gpiolib: of: change of_find_gpio() to accept device node
In preparation of switching all OF-based GPIO lookups to go through of_find_gpio() let's change it to accept device node as its argument as we do not always have access to device structure. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-of.h')
-rw-r--r--drivers/gpio/gpiolib-of.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib-of.h b/drivers/gpio/gpiolib-of.h
index 2c32a332ede5..bd4131ff61d3 100644
--- a/drivers/gpio/gpiolib-of.h
+++ b/drivers/gpio/gpiolib-of.h
@@ -7,7 +7,7 @@ struct gpio_chip;
enum of_gpio_flags;
#ifdef CONFIG_OF_GPIO
-struct gpio_desc *of_find_gpio(struct device *dev,
+struct gpio_desc *of_find_gpio(struct device_node *np,
const char *con_id,
unsigned int idx,
unsigned long *lookupflags);
@@ -16,7 +16,7 @@ void of_gpiochip_remove(struct gpio_chip *gc);
int of_gpio_get_count(struct device *dev, const char *con_id);
void of_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev);
#else
-static inline struct gpio_desc *of_find_gpio(struct device *dev,
+static inline struct gpio_desc *of_find_gpio(struct device_node *np,
const char *con_id,
unsigned int idx,
unsigned long *lookupflags)