Messages in this thread Patch in this message | | | From | Zheng Yongjun <> | Subject | [PATCH] ARM: omap1: Fix build error when CONFIG_ARCH_OMAP1_ANY not set | Date | Tue, 15 Nov 2022 14:07:24 +0000 |
| |
If CONFIG_BACKLIGHT_OMAP1=y && CONFIG_OMAP_MUX=y && CONFIG_ARCH_OMAP1_ANY=n, building fails:
drivers/video/backlight/omap1_bl.o: in function `omapbl_probe': omap1_bl.c:(.text+0x1a4): undefined reference to `omap_cfg_reg'
Make "extern int omap_cfg_reg" declaration under the control of macro 'CONFIG_OMAP_MUX' and 'CONFIG_ARCH_OMAP1_ANY' to fix this.
Fixes: 615dce5bf736 ("ARM: omap1: fix build with no SoC selected") Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- include/linux/soc/ti/omap1-mux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/soc/ti/omap1-mux.h b/include/linux/soc/ti/omap1-mux.h index 59c239b5569c..277a0e6c91bf 100644 --- a/include/linux/soc/ti/omap1-mux.h +++ b/include/linux/soc/ti/omap1-mux.h @@ -302,7 +302,7 @@ enum omap1xxx_index {
};
-#ifdef CONFIG_OMAP_MUX +#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP1_ANY) extern int omap_cfg_reg(unsigned long reg_cfg); #else static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } -- 2.17.1
| |