Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] power: supply: qcom_smbb: add regulator dependency
@ 2017-01-18 15:12 Arnd Bergmann
  2017-01-18 16:07 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-01-18 15:12 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tim Bird, Bjorn Andersson, Andy Gross, Stephen Boyd,
	Arnd Bergmann, linux-pm, linux-kernel

The added regulator dependency in the smbb driver causes build errors
when regulators are disabled, e.g. in randconfig build testing:

drivers/power/supply/qcom_smbb.o: In function `smbb_chg_otg_is_enabled':
qcom_smbb.c:(.text.smbb_chg_otg_is_enabled+0x18): undefined reference to `rdev_get_drvdata'
drivers/power/supply/qcom_smbb.o: In function `smbb_charger_probe':
qcom_smbb.c:(.text.smbb_charger_probe+0x410): undefined reference to `devm_regulator_register'

This adds a Kconfig dependency to avoid the link error.

Fixes: 61274eff0dde ("power: supply: qcom_smbb: Add otg regulator for control of vbus")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/supply/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index 59f9841dc246..5f134cf8988c 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -404,6 +404,7 @@ config CHARGER_QCOM_SMBB
 	depends on MFD_SPMI_PMIC || COMPILE_TEST
 	depends on OF
 	depends on EXTCON
+	depends on REGULATOR
 	help
 	  Say Y to include support for the Switch-Mode Battery Charger and
 	  Boost (SMBB) hardware found in Qualcomm PM8941 PMICs.  The charger
-- 
2.9.0

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

end of thread, other threads:[~2017-01-18 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-18 15:12 [PATCH] power: supply: qcom_smbb: add regulator dependency Arnd Bergmann
2017-01-18 16:07 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox