mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] firmware: arm_scmi: pmdomain: restrict default y for driver
Date: Fri,  1 Mar 2024 08:47:52 +0100	[thread overview]
Message-ID: <20240301074752.1618164-1-a.fatoum@pengutronix.de> (raw)

default y is inappropriate for drivers that depend on CONFIG_COMPILE_TEST,
because it enables the driver as soon as CONFIG_COMPILE_TEST is enabled.

While the driver can be built in that case, without
CONFIG_ARM_SCMI_PROTOCOL, it just prints a red error message on init:

  ERROR: initcall scmi_power_domain_driver_register+0x0/0x10 failed: Invalid argument

Therefore, allow building, but don't enable it by default unless
CONFIG_ARM_SCMI_PROTOCOL=y.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/firmware/arm_scmi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
index e14c1ede3619..29b0152901ad 100644
--- a/drivers/firmware/arm_scmi/Kconfig
+++ b/drivers/firmware/arm_scmi/Kconfig
@@ -73,7 +73,7 @@ endif #ARM_SCMI_PROTOCOL
 config ARM_SCMI_POWER_DOMAIN
 	tristate "SCMI power domain driver"
 	depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
-	default y
+	default ARM_SCMI_PROTOCOL
 	select PM_GENERIC_DOMAINS
 	help
 	  This enables support for the SCMI power domains which can be
-- 
2.39.2




             reply	other threads:[~2024-03-01  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  7:47 Ahmad Fatoum [this message]
2024-03-01  9:19 ` Sascha Hauer

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=20240301074752.1618164-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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