lkml.org 
[lkml]   [2022]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ARM: omap1: Fix build error when CONFIG_ARCH_OMAP1_ANY not set
Date
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
\
 
 \ /
  Last update: 2022-11-15 15:10    [W:0.038 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site