summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/spitz.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-03-07 22:47:45 +0300
committerMark Brown <broonie@kernel.org>2024-03-25 03:49:15 +0300
commit7fd54c205f104317b853fc417ac7e9d0b9531ddb (patch)
tree9c3e6537f569ae91a2a4639983a889479e3eaee4 /arch/arm/mach-pxa/spitz.c
parent4cece764965020c22cff7665b18a012006359095 (diff)
downloadlinux-7fd54c205f104317b853fc417ac7e9d0b9531ddb.tar.xz
spi: pxa2xx: Kill pxa2xx_set_spi_info()
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>
Diffstat (limited to 'arch/arm/mach-pxa/spitz.c')
-rw-r--r--arch/arm/mach-pxa/spitz.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index cc691b199429..318402ad685e 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -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