gpio: include linux/bug.h in interface header
PATCH 1/1 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.
include/linux/gpio/consumer.h +1 -0
@@ -1,6 +1,7 @@#ifndef __LINUX_GPIO_CONSUMER_H#define __LINUX_GPIO_CONSUMER_H +#include <linux/bug.h> #include <linux/err.h> #include <linux/kernel.h>
Quoted 10 lines · Arnd Bergmann
Today's linux-next kernel started showing build errors for the use of
WARN_ONinlinux/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.
I guess this went unnoticed because this part of the code is only active if compiled without gpiolib, which is not a very common configuration. Sorry about that.
Quoted 16 lines
Signed-off-by Arnd Bergmann <[email protected]>include/linux/gpio/consumer.h +1
-0@@ -1,6 +1,7 @@#ifndef __LINUX_GPIO_CONSUMER_H#define __LINUX_GPIO_CONSUMER_H +#include <linux/bug.h> #include <linux/err.h> #include <linux/kernel.h>
Quoted 7 lines · Arnd Bergmann
Today's linux-next kernel started showing build errors for the use of
WARN_ONinlinux/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]
Quoted 5 lines
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 <[email protected]>
Patch applied!
Yours,
Linus Walleij