public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
	Timon Baetz <timon.baetz@protonmail.com>,
	Krzysztof Kozlowski <krzk@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] power: supply: max8997_charger: make EXTCON dependency unconditional
Date: Mon,  8 Mar 2021 16:29:05 +0100	[thread overview]
Message-ID: <20210308152935.2263935-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Some of the extcon interfaces have a fallback implementation that can
be used when EXTCON is disabled, but some others do not, causing a
build failure:

drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all' [-Werror,-Wimplicit-function-declaration]
                ret = devm_extcon_register_notifier_all(&pdev->dev, charger->edev,
                      ^
drivers/power/supply/max8997_charger.c:261:9: note: did you mean 'devm_extcon_register_notifier'?
include/linux/extcon.h:263:19: note: 'devm_extcon_register_notifier' declared here
static inline int devm_extcon_register_notifier(struct device *dev,

I assume there is no reason to actually build this driver without extcon
support, so a hard dependency is the easiest fix. Alternatively the
header file could be extended to provide additional inline stubs.

Fixes: f384989e88d4 ("power: supply: max8997_charger: Set CHARGER current limit")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/supply/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index 006b95eca673..6cce17e1d47a 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -555,7 +555,7 @@ config CHARGER_MAX77693
 config CHARGER_MAX8997
 	tristate "Maxim MAX8997/MAX8966 PMIC battery charger driver"
 	depends on MFD_MAX8997 && REGULATOR_MAX8997
-	depends on EXTCON || !EXTCON
+	depends on EXTCON
 	help
 	  Say Y to enable support for the battery charger control sysfs and
 	  platform data of MAX8997/LP3974 PMICs.
-- 
2.29.2


             reply	other threads:[~2021-03-08 15:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 15:29 Arnd Bergmann [this message]
2021-03-08 15:33 ` [PATCH] power: supply: max8997_charger: make EXTCON dependency unconditional Krzysztof Kozlowski
2021-03-08 16:02   ` Arnd Bergmann
2021-03-08 16:11     ` Krzysztof Kozlowski
2021-03-09 10:11       ` Chanwoo Choi
2021-03-08 15:50 ` Matti Vaittinen
2021-03-08 16:07   ` Arnd Bergmann
2021-03-08 16:06 ` Andy Shevchenko
2021-03-08 16:10   ` Andy Shevchenko
2021-03-08 16:31   ` Vaittinen, Matti

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=20210308152935.2263935-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=arnd@arndb.de \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=sre@kernel.org \
    --cc=timon.baetz@protonmail.com \
    /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