diff mbox series

backlight: fix build error when CONFIG_ARCH_OMAP1_ANY=n

Message ID 20221108113835.4135655-1-liaoyu15@huawei.com
State New
Headers show
Series backlight: fix build error when CONFIG_ARCH_OMAP1_ANY=n | expand

Commit Message

Yu Liao Nov. 8, 2022, 11:38 a.m. UTC
If CONFIG_BACKLIGHT_OMAP1=y and CONFIG_ARCH_OMAP1_ANY=n, it leads a build
error:

	drivers/video/backlight/omap1_bl.o: In function `omapbl_probe':
	omap1_bl.c:(.text+0x198): undefined reference to `omap_cfg_reg'

Here is the link to the issue reported by kernel test bot:

https://lore.kernel.org/lkml/202211060819.fHDGmrB4-lkp@intel.com/

arch/arm/mach-omap1/mux.c where defines omap_cfg_reg() depends on
CONFIG_ARCH_OMAP1_ANY, so make CONFIG_BACKLIGHT_OMAP1 depends on
CONFIG_ARCH_OMAP1_ANY to fix it. ARCH_OMAP1_ANY depends on ARCH_OMAP1,
so the following logic is equivalent:

ARCH_OMAP1_ANY && (ARCH_OMAP1 || COMPILE_TEST) = ARCH_OMAP1_ANY

Fixes: 7036440eab3e ("ARM: omap1: enable multiplatform")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
---
 drivers/video/backlight/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yu Liao Nov. 9, 2022, 2:06 a.m. UTC | #1
On 2022/11/8 19:38, Yu Liao wrote:
> If CONFIG_BACKLIGHT_OMAP1=y and CONFIG_ARCH_OMAP1_ANY=n, it leads a build
> error:
> 
> 	drivers/video/backlight/omap1_bl.o: In function `omapbl_probe':
> 	omap1_bl.c:(.text+0x198): undefined reference to `omap_cfg_reg'
> 
> Here is the link to the issue reported by kernel test bot:
> 
> https://lore.kernel.org/lkml/202211060819.fHDGmrB4-lkp@intel.com/
> 
> arch/arm/mach-omap1/mux.c where defines omap_cfg_reg() depends on
> CONFIG_ARCH_OMAP1_ANY, so make CONFIG_BACKLIGHT_OMAP1 depends on
> CONFIG_ARCH_OMAP1_ANY to fix it. ARCH_OMAP1_ANY depends on ARCH_OMAP1,
> so the following logic is equivalent:
> 
> ARCH_OMAP1_ANY && (ARCH_OMAP1 || COMPILE_TEST) = ARCH_OMAP1_ANY
> 
> Fixes: 7036440eab3e ("ARM: omap1: enable multiplatform")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Yu Liao <liaoyu15@huawei.com>
> ---
>  drivers/video/backlight/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
> index 936ba1e4d35e..ff66cfebe45a 100644
> --- a/drivers/video/backlight/Kconfig
> +++ b/drivers/video/backlight/Kconfig
> @@ -211,7 +211,7 @@ config BACKLIGHT_LOCOMO
>  
>  config BACKLIGHT_OMAP1
>  	tristate "OMAP1 PWL-based LCD Backlight"
> -	depends on ARCH_OMAP1 || COMPILE_TEST
> +	depends on ARCH_OMAP1_ANY
>  	default ARCH_OMAP1
>  	help
>  	  This driver controls the LCD backlight level and power for
Sorry, guys.

I realize this modification is wrong, BACKLIGHT_OMAP1 does not depend on
ARCH_OMAP1_ANY, please ignore this patch.

Thanks,
Yu
diff mbox series

Patch

diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 936ba1e4d35e..ff66cfebe45a 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -211,7 +211,7 @@  config BACKLIGHT_LOCOMO
 
 config BACKLIGHT_OMAP1
 	tristate "OMAP1 PWL-based LCD Backlight"
-	depends on ARCH_OMAP1 || COMPILE_TEST
+	depends on ARCH_OMAP1_ANY
 	default ARCH_OMAP1
 	help
 	  This driver controls the LCD backlight level and power for