spi: pxa2xx: Kill pxa2xx_set_spi_info()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 7 Mar 2024 19:47:45 +0000 (21:47 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 25 Mar 2024 00:49:15 +0000 (00:49 +0000)
There is the only one user of the pxa2xx_set_spi_info(). Unexport it
and inline to the actual user.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://msgid.link/r/20240307195056.4059864-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/arm/mach-pxa/devices.c
arch/arm/mach-pxa/spitz.c
include/linux/spi/pxa2xx_spi.h

index 661b3fc4327596c2c8c17a6a357cb1791bcfcd3a..1e4cd502340ecef2d53c0f72729f6f0afe148ba1 100644 (file)
@@ -7,7 +7,6 @@
 #include <linux/clk-provider.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
-#include <linux/spi/pxa2xx_spi.h>
 #include <linux/platform_data/i2c-pxa.h>
 #include <linux/soc/pxa/cpu.h>
 
@@ -665,23 +664,6 @@ struct platform_device pxa27x_device_gpio = {
        .resource       = pxa_resource_gpio,
 };
 
-/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
- * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */
-void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info)
-{
-       struct platform_device *pd;
-
-       pd = platform_device_alloc("pxa2xx-spi", id);
-       if (pd == NULL) {
-               printk(KERN_ERR "pxa2xx-spi: failed to allocate device id %d\n",
-                      id);
-               return;
-       }
-
-       pd->dev.platform_data = info;
-       platform_device_add(pd);
-}
-
 static struct resource pxa_dma_resource[] = {
        [0] = {
                .start  = 0x40000000,
index cc691b199429ca26604ed5359106c35d17644e19..318402ad685ead855a48e5ccc2bdb5bd2fde8b76 100644 (file)
@@ -585,6 +585,9 @@ static struct gpiod_lookup_table spitz_spi_gpio_table = {
 
 static void __init spitz_spi_init(void)
 {
+       struct platform_device *pd;
+       int id = 2;
+
        if (machine_is_akita())
                gpiod_add_lookup_table(&akita_lcdcon_gpio_table);
        else
@@ -592,7 +595,16 @@ static void __init spitz_spi_init(void)
 
        gpiod_add_lookup_table(&spitz_ads7846_gpio_table);
        gpiod_add_lookup_table(&spitz_spi_gpio_table);
-       pxa2xx_set_spi_info(2, &spitz_spi_info);
+
+       /* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1 */
+       pd = platform_device_alloc("pxa2xx-spi", id);
+       if (pd == NULL) {
+               pr_err("pxa2xx-spi: failed to allocate device id %d\n", id);
+       } else {
+               pd->dev.platform_data = &spitz_spi_info;
+               platform_device_add(pd);
+       }
+
        spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));
 }
 #else
index ca2cd4e30ead7d5d9fee3610d22f56be6e7d7af8..56aba2f737b117fae3aad4154980c74e55247d64 100644 (file)
@@ -45,12 +45,4 @@ struct pxa2xx_spi_chip {
        u32 timeout;
 };
 
-#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP)
-
-#include <linux/clk.h>
-
-extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info);
-
-#endif
-
 #endif /* __LINUX_SPI_PXA2XX_SPI_H */