]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
power/supply: fix sc27xx_fuel_gauge build errors
authorRandy Dunlap <rdunlap@infradead.org>
Mon, 12 Nov 2018 17:06:32 +0000 (09:06 -0800)
committerSebastian Reichel <sre@kernel.org>
Tue, 13 Nov 2018 02:03:21 +0000 (03:03 +0100)
Fix build errors when FUEL_GUAGE_SC27XX is enabled but IIO is either
not enabled or IIO=m and FUEL_GUAGE_SC27XX=y.

ld: drivers/power/supply/sc27xx_fuel_gauge.o: in function `sc27xx_fgu_get_temp':
sc27xx_fuel_gauge.c:(.text+0x1d2): undefined reference to `iio_read_channel_processed'
ld: drivers/power/supply/sc27xx_fuel_gauge.o: in function `sc27xx_fgu_probe':
sc27xx_fuel_gauge.c:(.text+0x97f): undefined reference to `devm_iio_channel_get'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-pm@vger.kernel.org
Acked-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/Kconfig

index 917f4b7f3fd1d2918c9b2191104f347d01b54fa6..e901b9879e7e70ce917af7bd740a41c74a651420 100644 (file)
@@ -655,6 +655,7 @@ config CHARGER_SC2731
 config FUEL_GAUGE_SC27XX
        tristate "Spreadtrum SC27XX fuel gauge driver"
        depends on MFD_SC27XX_PMIC || COMPILE_TEST
+       depends on IIO
        help
         Say Y here to enable support for fuel gauge with SC27XX
         PMIC chips.