From c8f3c9fe83cafc94679007b9c0083ee25d5735e0 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Fri, 10 May 2019 15:18:23 +0800 Subject: [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR Fix gcc build error while CONFIG_REGULATOR is not set drivers/power/supply/ucs1002_power.o: In function `ucs1002_probe': drivers/power/supply/ucs1002_power.c:593: undefined reference to `devm_regulator_register' drivers/power/supply/ucs1002_power.o:(.rodata+0x3b8): undefined reference to `regulator_enable_regmap' drivers/power/supply/ucs1002_power.o:(.rodata+0x3c0): undefined reference to `regulator_disable_regmap' drivers/power/supply/ucs1002_power.o:(.rodata+0x3c8): undefined reference to `regulator_is_enabled_regmap' Add Kconfig dependency to CONFIG_REGULATOR. Reported-by: Hulk Robot Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002") Signed-off-by: YueHaibing Reviewed-by: Guenter Roeck Signed-off-by: Sebastian Reichel --- drivers/power/supply/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig index fb813b1..678de2b 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig @@ -675,6 +675,7 @@ config CHARGER_UCS1002 tristate "Microchip UCS1002 USB Port Power Controller" depends on I2C depends on OF + depends on REGULATOR select REGMAP_I2C help Say Y to enable support for Microchip UCS1002 Programmable -- 2.7.4