ARM: s3c24xx: fix unused gta02_configure_pmu_for_charger warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 29 Jan 2016 14:50:35 +0000 (15:50 +0100)
committerKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 1 Feb 2016 00:49:16 +0000 (09:49 +0900)
gta02_configure_pmu_for_charger is only used when CONFIG_PCF50633_ADC
is set, and otherwise we get a warning about an unused symbol:

arch/arm/mach-s3c24xx/mach-gta02.c:158:1: warning: 'gta02_configure_pmu_for_charger' defined but not used [-Wunused-function]
 gta02_configure_pmu_for_charger(struct pcf50633 *pcf, void *unused, int res)

This adds an #ifdef to shut up the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
arch/arm/mach-s3c24xx/mach-gta02.c

index 6d1e0b9c5b27cc0ece0eb3f61a69111d62dec931..27ae6877550f7b8972c288ee32fa43a7e9a3a07c 100644 (file)
@@ -154,6 +154,7 @@ static struct s3c2410_uartcfg gta02_uartcfgs[] = {
 #define ADC_NOM_CHG_DETECT_1A 6
 #define ADC_NOM_CHG_DETECT_USB 43
 
+#ifdef CONFIG_PCF50633_ADC
 static void
 gta02_configure_pmu_for_charger(struct pcf50633 *pcf, void *unused, int res)
 {
@@ -174,6 +175,7 @@ gta02_configure_pmu_for_charger(struct pcf50633 *pcf, void *unused, int res)
 
        pcf50633_mbc_usb_curlim_set(pcf, ma);
 }
+#endif
 
 static struct delayed_work gta02_charger_work;
 static int gta02_usb_vbus_draw;