ARM: pxa: fix build breakage on PXA3xx
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 13 Jul 2024 03:34:51 +0000 (20:34 -0700)
committerArnd Bergmann <arnd@arndb.de>
Mon, 15 Jul 2024 11:53:28 +0000 (13:53 +0200)
Commit 917195d6f829 ("ARM: pxa: consolidate GPIO chip platform data")
tried to reuse the same instance of platform data for PXA25x and PXA27x
GPIO controllers by moving it into arch/arm/mach-pxa/devices.c
Unfortunately this file is built for other PXA variants which resulted
in the following error:

>> arm-linux-gnueabi-ld: arch/arm/mach-pxa/devices.o:(.data+0x167c): undefined reference to `gpio_set_wake'

Fix this by using #ifdef around PXA25x and PXA27x GPIO controller device
structures and associated data.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407112039.cyyIQ3Js-lkp@intel.com/
Fixes: 917195d6f829 ("ARM: pxa: consolidate GPIO chip platform data")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-pxa/devices.c

index d050a4c78f97eed5f2c0c0467870e39d3079fde5..7695cfce01a16722d9a3b5d6a49f4c73bb72a132 100644 (file)
@@ -633,6 +633,7 @@ struct platform_device pxa27x_device_pwm1 = {
 };
 #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
 
+#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
 const struct software_node pxa2xx_gpiochip_node = {
        .name   = "gpio-pxa",
 };
@@ -684,6 +685,7 @@ struct platform_device pxa27x_device_gpio = {
                .platform_data  = &pxa2xx_gpio_info,
        },
 };
+#endif /* CONFIG_PXA25x || CONFIG_PXA27x */
 
 static struct resource pxa_dma_resource[] = {
        [0] = {