提交 a3485d08 编写于 作者: L Lars-Peter Clausen 提交者: Linus Walleij

gpio: consumer.h: Move forward declarations outside #ifdef

Make sure that the forward declared structs in gpio/consumer.h are also visible
on the else branch of the CONFIG_GPIOLIB #ifdef.

Fixes the following warnings and their associated errors when CONFIG_GPIOLIB is
not selected:
	include/linux/gpio/consumer.h:67:14: warning: 'struct device' declared inside parameter list
	include/linux/gpio/consumer.h:67:14: warning: its scope is only this definition or declaration, which is probably not what you want
	[...]
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 90d16a43
......@@ -4,8 +4,6 @@
#include <linux/err.h>
#include <linux/kernel.h>
#ifdef CONFIG_GPIOLIB
struct device;
struct gpio_chip;
......@@ -18,6 +16,8 @@ struct gpio_chip;
*/
struct gpio_desc;
#ifdef CONFIG_GPIOLIB
/* Acquire and dispose GPIOs */
struct gpio_desc *__must_check gpiod_get(struct device *dev,
const char *con_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册