[PATCH] ARM: omap1: Fix build error when CONFIG_ARCH_OMAP1_ANY not set

Zheng Yongjun posted 1 patch 3 years, 4 months ago
include/linux/soc/ti/omap1-mux.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] ARM: omap1: Fix build error when CONFIG_ARCH_OMAP1_ANY not set
Posted by Zheng Yongjun 3 years, 4 months ago
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