Skip to contentSkip to conversation

gpiolib: fix of_find_gpio() when OF not defined

PATCH In review Alexandre Courbot 2 participants 2 messages Nov 19, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiolib: fix of_find_gpio() when OF not defined

The prototype for static GPIO lookup functions has been updated to use an explicit type for GPIO lookup flags. Unfortunately the definition of of_find_gpio() when CONFIG_OF is not defined has been omitted, which triggers a warning. This patch fixes this.

--
This fixes the kbuild test robot warning about
"gpiolib: use dedicated flags for GPIO properties". Hopefully this can be squashed into this same patch. Apologies for the trouble.

---
 drivers/gpio/gpiolib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpiolib.c +2 -1
index 48d1a67ed488..463496160a94 100644
@@ -2299,7 +2299,8 @@ static struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
 }
 #else
 static struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
-				      unsigned int idx, unsigned long *flags)
+				      unsigned int idx,
+				      enum gpio_lookup_flags *flags)
 {
 	return ERR_PTR(-ENODEV);
 }
Signature · 1 line
1.8.4.2
#1 lore raw
Quoted 10 lines · Alexandre Courbot

The prototype for static GPIO lookup functions has been updated to use an explicit type for GPIO lookup flags. Unfortunately the definition of of_find_gpio() when CONFIG_OF is not defined has been omitted, which triggers a warning. This patch fixes this.

--
This fixes the kbuild test robot warning about
"gpiolib: use dedicated flags for GPIO properties". Hopefully this can be squashed into this same patch. Apologies for the trouble.

Thanks!

Patch applied for fixes.

Yours,
Linus Walleij