Commit a9373f40 authored by Finn Thain's avatar Finn Thain Committed by Geert Uytterhoeven

m68k/mac: Adopt platform_device_register_simple()

These changes save 1014 bytes according to scripts/bloat-o-meter.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 889121b4
...@@ -919,15 +919,6 @@ static void mac_get_model(char *str) ...@@ -919,15 +919,6 @@ static void mac_get_model(char *str)
strcat(str, macintosh_config->name); strcat(str, macintosh_config->name);
} }
static struct resource swim_rsrc = { .flags = IORESOURCE_MEM };
static struct platform_device swim_pdev = {
.name = "swim",
.id = -1,
.num_resources = 1,
.resource = &swim_rsrc,
};
static const struct resource mac_scsi_iifx_rsrc[] __initconst = { static const struct resource mac_scsi_iifx_rsrc[] __initconst = {
{ {
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -992,26 +983,6 @@ static const struct resource mac_scsi_ccl_rsrc[] __initconst = { ...@@ -992,26 +983,6 @@ static const struct resource mac_scsi_ccl_rsrc[] __initconst = {
}, },
}; };
static struct platform_device esp_0_pdev = {
.name = "mac_esp",
.id = 0,
};
static struct platform_device esp_1_pdev = {
.name = "mac_esp",
.id = 1,
};
static struct platform_device sonic_pdev = {
.name = "macsonic",
.id = -1,
};
static struct platform_device mace_pdev = {
.name = "macmace",
.id = -1,
};
int __init mac_platform_init(void) int __init mac_platform_init(void)
{ {
u8 *swim_base; u8 *swim_base;
...@@ -1043,9 +1014,13 @@ int __init mac_platform_init(void) ...@@ -1043,9 +1014,13 @@ int __init mac_platform_init(void)
} }
if (swim_base) { if (swim_base) {
swim_rsrc.start = (resource_size_t) swim_base, struct resource swim_rsrc = {
swim_rsrc.end = (resource_size_t) swim_base + 0x2000, .flags = IORESOURCE_MEM,
platform_device_register(&swim_pdev); .start = (resource_size_t)swim_base,
.end = (resource_size_t)swim_base + 0x2000,
};
platform_device_register_simple("swim", -1, &swim_rsrc, 1);
} }
/* /*
...@@ -1055,13 +1030,13 @@ int __init mac_platform_init(void) ...@@ -1055,13 +1030,13 @@ int __init mac_platform_init(void)
switch (macintosh_config->scsi_type) { switch (macintosh_config->scsi_type) {
case MAC_SCSI_QUADRA: case MAC_SCSI_QUADRA:
case MAC_SCSI_QUADRA3: case MAC_SCSI_QUADRA3:
platform_device_register(&esp_0_pdev); platform_device_register_simple("mac_esp", 0, NULL, 0);
break; break;
case MAC_SCSI_QUADRA2: case MAC_SCSI_QUADRA2:
platform_device_register(&esp_0_pdev); platform_device_register_simple("mac_esp", 0, NULL, 0);
if ((macintosh_config->ident == MAC_MODEL_Q900) || if ((macintosh_config->ident == MAC_MODEL_Q900) ||
(macintosh_config->ident == MAC_MODEL_Q950)) (macintosh_config->ident == MAC_MODEL_Q950))
platform_device_register(&esp_1_pdev); platform_device_register_simple("mac_esp", 1, NULL, 0);
break; break;
case MAC_SCSI_IIFX: case MAC_SCSI_IIFX:
/* Addresses from The Guide to Mac Family Hardware. /* Addresses from The Guide to Mac Family Hardware.
...@@ -1127,10 +1102,10 @@ int __init mac_platform_init(void) ...@@ -1127,10 +1102,10 @@ int __init mac_platform_init(void)
switch (macintosh_config->ether_type) { switch (macintosh_config->ether_type) {
case MAC_ETHER_SONIC: case MAC_ETHER_SONIC:
platform_device_register(&sonic_pdev); platform_device_register_simple("macsonic", -1, NULL, 0);
break; break;
case MAC_ETHER_MACE: case MAC_ETHER_MACE:
platform_device_register(&mace_pdev); platform_device_register_simple("macmace", -1, NULL, 0);
break; break;
} }
......
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