ARM: pxa: define palmte2_pxa_keys conditionally
authorArnd Bergmann <arnd@arndb.de>
Mon, 30 Apr 2012 16:05:28 +0000 (16:05 +0000)
committerArnd Bergmann <arnd@arndb.de>
Thu, 4 Oct 2012 08:20:05 +0000 (10:20 +0200)
Gcc prints a harmless warning about palmte2_pxa_keys not being used
when the gpio keyboard driver is disabled. The solution is to use
the same #ifdef that is already present in the place where the
symbol is used.

Without this patch, building palmz72_defconfig results in:

/home/arnd/linux-arm/arch/arm/mach-pxa/palmte2.c:128:31: warning: 'palmte2_pxa_keys' defined but not used [-Wunused-variable]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Carlos Eduardo Medaglia Dyonisio <cadu@nerdfeliz.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
arch/arm/mach-pxa/palmte2.c

index c054827c567f81805771e7a9160748dcb8124b68..8497b28825e5d9f6d021ccbceeceb45e2d43620f 100644 (file)
@@ -105,6 +105,7 @@ static struct pxamci_platform_data palmte2_mci_platform_data = {
        .gpio_power             = GPIO_NR_PALMTE2_SD_POWER,
 };
 
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
 /******************************************************************************
  * GPIO keys
  ******************************************************************************/
@@ -132,6 +133,7 @@ static struct platform_device palmte2_pxa_keys = {
                .platform_data = &palmte2_pxa_keys_data,
        },
 };
+#endif
 
 /******************************************************************************
  * Backlight