Skip to content

Commit b7db7d9

Browse files
Junjie650lag-linaro
authored andcommitted
backlight: aw99706: Fix build errors caused by wrong gpio header
The driver uses GPIO descriptor API (devm_gpiod_get, gpiod_set_value_cansleep, GPIOD_OUT_LOW) but includes the legacy <linux/gpio.h> header instead of <linux/gpio/consumer.h>. When CONFIG_GPIOLIB is not set, <linux/gpio.h> does not include <linux/gpio/consumer.h>, causing build errors: error: implicit declaration of function 'gpiod_set_value_cansleep' error: implicit declaration of function 'devm_gpiod_get' error: 'GPIOD_OUT_LOW' undeclared Fix by including the correct header <linux/gpio/consumer.h>. Fixes: 147b38a ("backlight: aw99706: Add support for Awinic AW99706 backlight") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202512171631.uKXlYwqu-lkp@intel.com/ Signed-off-by: Junjie Cao <junjie.cao@intel.com> Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org> Link: https://patch.msgid.link/20260111130117.5041-1-junjie.cao@intel.com Signed-off-by: Lee Jones <lee@kernel.org>
1 parent b516456 commit b7db7d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/video/backlight/aw99706.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <linux/backlight.h>
1313
#include <linux/bitfield.h>
1414
#include <linux/delay.h>
15-
#include <linux/gpio.h>
15+
#include <linux/gpio/consumer.h>
1616
#include <linux/i2c.h>
1717
#include <linux/kernel.h>
1818
#include <linux/module.h>

0 commit comments

Comments
 (0)