lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250503140431.438727-1-arnd@kernel.org>
Date: Sat,  3 May 2025 16:04:26 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Sebastian Reichel <sre@...nel.org>,
	Svyatoslav Ryhel <clamor95@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	"Dr. David Alan Gilbert" <linux@...blig.org>,
	Thomas Weißschuh <linux@...ssschuh.net>,
	Dmitry Baryshkov <lumag@...nel.org>,
	Dimitri Fedrau <dima.fedrau@...il.com>,
	Andreas Kemnade <andreas@...nade.info>,
	Pengyu Luo <mitltlatltl@...il.com>,
	linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] power: supply: add EXTCON dependency

From: Arnd Bergmann <arnd@...db.de>

max8971 is written to work with or without extcon, but it fails
to link when built-in when the extcon subsystem is in a loadable
module:

x86_64-linux-ld: drivers/power/supply/max8971_charger.o: in function `max8971_probe':
max8971_charger.c:(.text+0x2ab): undefined reference to `extcon_find_edev_by_node'

Add the appropriate dependency that allows the working cases but
prevents the link failure.

Fixes: 60cd40eee4f4 ("power: supply: Add support for Maxim MAX8971 charger")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/power/supply/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index 797c8d1b04aa..daab8214e225 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -621,6 +621,7 @@ config CHARGER_MAX77976
 config CHARGER_MAX8971
 	tristate "Maxim MAX8971 battery charger driver"
 	depends on I2C
+	depends on EXTCON || !EXTCON
 	select REGMAP_I2C
 	help
 	  The MAX8971 is a compact, high-frequency, high-efficiency switch-mode
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ