linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ren Zhijie <renzhijie2@huawei.com>
To: <linus.walleij@linaro.org>, <zhanghongchen@loongson.cn>,
	<zhuyinbo@loongson.cn>
Cc: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<yusongping@huawei.com>, Ren Zhijie <renzhijie2@huawei.com>
Subject: [PATCH -next] pinctrl: pinctrl-loongson2: fix Kconfig dependency
Date: Mon, 21 Nov 2022 13:26:08 +0000	[thread overview]
Message-ID: <20221121132608.230645-1-renzhijie2@huawei.com> (raw)

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


             reply	other threads:[~2022-11-21 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 13:26 Ren Zhijie [this message]
2022-11-21 13:36 ` [PATCH -next] pinctrl: pinctrl-loongson2: fix Kconfig dependency 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221121132608.230645-1-renzhijie2@huawei.com \
    --to=renzhijie2@huawei.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yusongping@huawei.com \
    --cc=zhanghongchen@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).