Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: include linux/bug.h in interface header

Today's linux-next kernel started showing build errors for the
use of WARN_ON in linux/gpio/consumer.h:

In file included from drivers/video/backlight/pwm_bl.c:13:0:
include/linux/gpio/consumer.h: In function 'gpiod_put':
include/linux/gpio/consumer.h:81:2: error: implicit declaration of function 'WARN_ON' [-Werror=implicit-function-declaration]

It's not clear why this never happened before, but this patch
fixes it by including the header that contains the defintion
of this macro.

Signed-off-by: Arnd Bergmann <arnd@arnd.de>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Arnd Bergmann and committed by
Linus Walleij
cdf86cd2 345477ff

+1
+1
include/linux/gpio/consumer.h
··· 1 1 #ifndef __LINUX_GPIO_CONSUMER_H 2 2 #define __LINUX_GPIO_CONSUMER_H 3 3 4 + #include <linux/bug.h> 4 5 #include <linux/err.h> 5 6 #include <linux/kernel.h> 6 7