diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2017-04-08 19:51:15 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2017-04-20 09:54:24 +0200 |
commit | a9373f40ac3a5aac4b9a199a15331708616e8947 (patch) | |
tree | e37794440d798029b98600041309be152e9d2f5b /arch/m68k/mac | |
parent | 889121b404d9e313fb9ebeb99b25ff4a24e6a7f7 (diff) | |
download | linux-a9373f40ac3a5aac4b9a199a15331708616e8947.tar.bz2 |
m68k/mac: Adopt platform_device_register_simple()
These changes save 1014 bytes according to scripts/bloat-o-meter.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r-- | arch/m68k/mac/config.c | 49 |
1 files changed, 12 insertions, 37 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 661892d57f79..22123f7e8f75 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -919,15 +919,6 @@ static void mac_get_model(char *str) 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 = { { .flags = IORESOURCE_IRQ, @@ -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) { u8 *swim_base; @@ -1043,9 +1014,13 @@ int __init mac_platform_init(void) } if (swim_base) { - swim_rsrc.start = (resource_size_t) swim_base, - swim_rsrc.end = (resource_size_t) swim_base + 0x2000, - platform_device_register(&swim_pdev); + struct resource swim_rsrc = { + .flags = IORESOURCE_MEM, + .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) switch (macintosh_config->scsi_type) { case MAC_SCSI_QUADRA: case MAC_SCSI_QUADRA3: - platform_device_register(&esp_0_pdev); + platform_device_register_simple("mac_esp", 0, NULL, 0); break; 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) || (macintosh_config->ident == MAC_MODEL_Q950)) - platform_device_register(&esp_1_pdev); + platform_device_register_simple("mac_esp", 1, NULL, 0); break; case MAC_SCSI_IIFX: /* Addresses from The Guide to Mac Family Hardware. @@ -1127,10 +1102,10 @@ int __init mac_platform_init(void) switch (macintosh_config->ether_type) { case MAC_ETHER_SONIC: - platform_device_register(&sonic_pdev); + platform_device_register_simple("macsonic", -1, NULL, 0); break; case MAC_ETHER_MACE: - platform_device_register(&mace_pdev); + platform_device_register_simple("macmace", -1, NULL, 0); break; } |