diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2015-05-07 01:08:08 -0700 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2015-05-25 13:26:45 -0700 |
commit | 496e7ce2a46562938edcb74f65b26068ee8895f6 (patch) | |
tree | a3ebe67c4b84281f9b2d6f8363c06dded3b9abf4 /include/linux/gpio | |
parent | b7da8c5c725cc2db97d1944cc34c08692aeacc85 (diff) | |
download | lwn-496e7ce2a46562938edcb74f65b26068ee8895f6.tar.gz lwn-496e7ce2a46562938edcb74f65b26068ee8895f6.zip |
gpiolib: Add missing dummies for the unified device properties interface
If GPIOLIB=n:
drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast
Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
for the !GPIOLIB case to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface")
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r-- | include/linux/gpio/consumer.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 3a7c9ffd5ab9..da042657dc31 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -406,6 +406,21 @@ static inline int desc_to_gpio(const struct gpio_desc *desc) return -EINVAL; } +/* Child properties interface */ +struct fwnode_handle; + +static inline struct gpio_desc *fwnode_get_named_gpiod( + struct fwnode_handle *fwnode, const char *propname) +{ + return ERR_PTR(-ENOSYS); +} + +static inline struct gpio_desc *devm_get_gpiod_from_child( + struct device *dev, const char *con_id, struct fwnode_handle *child) +{ + return ERR_PTR(-ENOSYS); +} + #endif /* CONFIG_GPIOLIB */ /* |