public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] backlight: aw99706: Fix build errors caused by wrong gpio header
@ 2026-01-11 13:01 Junjie Cao
  2026-01-14 16:18 ` Daniel Thompson
  2026-01-20 16:08 ` (subset) " Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Junjie Cao @ 2026-01-11 13:01 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han
  Cc: Pengyu Luo, dri-devel, linux-kernel, caojunjie650, Junjie Cao,
	kernel test robot

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: 147b38a5ad06 ("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>
---
 drivers/video/backlight/aw99706.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/aw99706.c
index df5b23b2f753..938f352aaab7 100644
--- a/drivers/video/backlight/aw99706.c
+++ b/drivers/video/backlight/aw99706.c
@@ -12,7 +12,7 @@
 #include <linux/backlight.h>
 #include <linux/bitfield.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] backlight: aw99706: Fix build errors caused by wrong gpio header
  2026-01-11 13:01 [PATCH] backlight: aw99706: Fix build errors caused by wrong gpio header Junjie Cao
@ 2026-01-14 16:18 ` Daniel Thompson
  2026-01-20 16:08 ` (subset) " Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Thompson @ 2026-01-14 16:18 UTC (permalink / raw)
  To: Junjie Cao
  Cc: Lee Jones, Jingoo Han, Pengyu Luo, dri-devel, linux-kernel,
	caojunjie650, kernel test robot

On Sun, Jan 11, 2026 at 09:01:17PM +0800, Junjie Cao wrote:
> 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: 147b38a5ad06 ("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>


Daniel.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: (subset) [PATCH] backlight: aw99706: Fix build errors caused by wrong gpio header
  2026-01-11 13:01 [PATCH] backlight: aw99706: Fix build errors caused by wrong gpio header Junjie Cao
  2026-01-14 16:18 ` Daniel Thompson
@ 2026-01-20 16:08 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2026-01-20 16:08 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Junjie Cao
  Cc: Pengyu Luo, dri-devel, linux-kernel, caojunjie650,
	kernel test robot

On Sun, 11 Jan 2026 21:01:17 +0800, Junjie Cao wrote:
> 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:
> 
> [...]

Applied, thanks!

[1/1] backlight: aw99706: Fix build errors caused by wrong gpio header
      commit: b7db7d9c4ffc04210fe631f73a81746d6e2ef24b

--
Lee Jones [李琼斯]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-20 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 13:01 [PATCH] backlight: aw99706: Fix build errors caused by wrong gpio header Junjie Cao
2026-01-14 16:18 ` Daniel Thompson
2026-01-20 16:08 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox