Commit c8f3c9fe authored by YueHaibing's avatar YueHaibing Committed by Sebastian Reichel

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: default avatarHulk Robot <hulkci@huawei.com>
Fixes: 9a2688e4 ("power: supply: Add driver for Microchip UCS1002")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 09eb8b7c
...@@ -675,6 +675,7 @@ config CHARGER_UCS1002 ...@@ -675,6 +675,7 @@ config CHARGER_UCS1002
tristate "Microchip UCS1002 USB Port Power Controller" tristate "Microchip UCS1002 USB Port Power Controller"
depends on I2C depends on I2C
depends on OF depends on OF
depends on REGULATOR
select REGMAP_I2C select REGMAP_I2C
help help
Say Y to enable support for Microchip UCS1002 Programmable Say Y to enable support for Microchip UCS1002 Programmable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment