Commit d66a2fb8 authored by Russell King's avatar Russell King

ARM: sa1100: explicitly register sa11x0-pcmcia devices

Simplify the code by getting rid of the conditional automatic
registration of the sa11x0 PCMCIA interfaces in sa1100_init(), and
require all platforms to explicitly call sa11x0_register_pcmcia().
Only one platform (iPAQ) is affected by this change.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent 65102238
...@@ -235,18 +235,11 @@ void sa11x0_register_lcd(struct sa1100fb_mach_info *inf) ...@@ -235,18 +235,11 @@ void sa11x0_register_lcd(struct sa1100fb_mach_info *inf)
sa11x0_register_device(&sa11x0fb_device, inf); sa11x0_register_device(&sa11x0fb_device, inf);
} }
static bool sa11x0pcmcia_legacy = true;
static struct platform_device sa11x0pcmcia_device = {
.name = "sa11x0-pcmcia",
.id = -1,
};
void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *table) void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *table)
{ {
if (table) if (table)
gpiod_add_lookup_table(table); gpiod_add_lookup_table(table);
platform_device_register_simple("sa11x0-pcmcia", socket, NULL, 0); platform_device_register_simple("sa11x0-pcmcia", socket, NULL, 0);
sa11x0pcmcia_legacy = false;
} }
static struct platform_device sa11x0mtd_device = { static struct platform_device sa11x0mtd_device = {
...@@ -331,9 +324,6 @@ static int __init sa1100_init(void) ...@@ -331,9 +324,6 @@ static int __init sa1100_init(void)
{ {
pm_power_off = sa1100_power_off; pm_power_off = sa1100_power_off;
if (sa11x0pcmcia_legacy)
platform_device_register(&sa11x0pcmcia_device);
regulator_has_full_constraints(); regulator_has_full_constraints();
return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices)); return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices));
......
...@@ -126,6 +126,7 @@ static void __init h3100_mach_init(void) ...@@ -126,6 +126,7 @@ static void __init h3100_mach_init(void)
{ {
h3xxx_mach_init(); h3xxx_mach_init();
sa11x0_register_pcmcia(-1, NULL);
sa11x0_register_lcd(&h3100_lcd_info); sa11x0_register_lcd(&h3100_lcd_info);
sa11x0_register_irda(&h3100_irda_data); sa11x0_register_irda(&h3100_irda_data);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment