]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
power: supply: ucs1002: Fix build error without CONFIG_REGULATOR
authorYueHaibing <yuehaibing@huawei.com>
Fri, 10 May 2019 07:18:23 +0000 (15:18 +0800)
committerSebastian Reichel <sre@kernel.org>
Fri, 10 May 2019 16:20:50 +0000 (18:20 +0200)
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 <hulkci@huawei.com>
Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/Kconfig

index fb813b14d55df8518141d8fc52c716c50945ee67..678de2b04c6605560a0f3f6a403e19e5bcc1cf32 100644 (file)
@@ -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