linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] pinctrl: pinctrl-loongson2: fix Kconfig dependency
@ 2022-11-21 13:26 Ren Zhijie
  2022-11-21 13:36 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Ren Zhijie @ 2022-11-21 13:26 UTC (permalink / raw)
  To: linus.walleij, zhanghongchen, zhuyinbo
  Cc: linux-gpio, linux-kernel, yusongping, Ren Zhijie

If CONFIG_PINCTRL_LOONGSON2=y and CONFIG_OF is not set,
gcc complained about undefined reference:

drivers/pinctrl/pinctrl-loongson2.o: In function `pinconf_generic_dt_node_to_map_all':
pinctrl-loongson2.c:(.text+0x1c4): undefined reference to
`pinconf_generic_dt_node_to_map'

To fix this error, add depends on OF to
config PINCTRL_LOONGSON2.

Fixes: f73f88acbc18 ("pinctrl: pinctrl-loongson2: add pinctrl driver support")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
---
 drivers/pinctrl/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 35f167f70829..7d5f5458c72e 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -260,7 +260,7 @@ config PINCTRL_FALCON
 
 config PINCTRL_LOONGSON2
 	tristate "Pinctrl driver for the Loongson-2 SoC"
-	depends on LOONGARCH || COMPILE_TEST
+	depends on OF && (LOONGARCH || COMPILE_TEST)
 	select PINMUX
 	select GENERIC_PINCONF
 	help
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH -next] pinctrl: pinctrl-loongson2: fix Kconfig dependency
@ 2022-11-21 13:14 Ren Zhijie
  2022-11-21 13:32 ` Ren Zhijie
  0 siblings, 1 reply; 4+ messages in thread
From: Ren Zhijie @ 2022-11-21 13:14 UTC (permalink / raw)
  To: linus.walleij, zhanghongchen, zhuyinbo
  Cc: linux-gpio, linux-kernel, yusongping, Ren Zhijie

If CONFIG_PINCTRL_LOONGSON2=y and CONFIG_OF is not set,
gcc complained about undefined reference:

drivers/pinctrl/pinctrl-loongson2.o: In function `pinconf_generic_dt_node_to_map_all':
pinctrl-loongson2.c:(.text+0x1c4): undefined reference to
`pinconf_generic_dt_node_to_map'

To fix this error, add depends on OF to
config PINCTRL_LOONGSON2.

Fixes: f73f88acbc18 ("pinctrl: pinctrl-loongson2: add pinctrl driver support")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
---
 drivers/pinctrl/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 35f167f70829..7d5f5458c72e 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -260,7 +260,7 @@ config PINCTRL_FALCON
 
 config PINCTRL_LOONGSON2
 	tristate "Pinctrl driver for the Loongson-2 SoC"
-	depends on LOONGARCH || COMPILE_TEST
+	depends on OF && (LOONGARCH || COMPILE_TEST)
 	select PINMUX
 	select GENERIC_PINCONF
 	help
-- 
2.17.1


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

end of thread, other threads:[~2022-11-21 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 13:26 [PATCH -next] pinctrl: pinctrl-loongson2: fix Kconfig dependency Ren Zhijie
2022-11-21 13:36 ` Linus Walleij
  -- strict thread matches above, loose matches on Subject: below --
2022-11-21 13:14 Ren Zhijie
2022-11-21 13:32 ` Ren Zhijie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).