提交 496e7ce2 编写于 作者: G Geert Uytterhoeven 提交者: Bryan Wu

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: NGeert Uytterhoeven <geert@linux-m68k.org>
Fixes: 40b73183 ("gpio: Support for unified device properties interface")
Acked-by: NAlexandre Courbot <acourbot@nvidia.com>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NBryan Wu <cooloney@gmail.com>
上级 b7da8c5c
......@@ -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 */
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册