]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: shmobile: sh7372 pinmux platform device cleanup
authorMagnus Damm <damm@opensource.se>
Wed, 3 Apr 2013 06:33:18 +0000 (15:33 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 22 May 2013 12:46:25 +0000 (21:46 +0900)
Use DEFINE_RES_MEM() and platform_device_register_simple()
to save a couple of lines of code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/setup-sh7372.c

index 5502d624aca6cca299302f9aa975f420793cbcee..c70a3cc9a119410e463b41173f071bdd3eaba4d5 100644 (file)
@@ -62,29 +62,15 @@ void __init sh7372_map_io(void)
 }
 
 /* PFC */
-static struct resource sh7372_pfc_resources[] = {
-       [0] = {
-               .start  = 0xe6050000,
-               .end    = 0xe6057fff,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = 0xe605800c,
-               .end    = 0xe6058027,
-               .flags  = IORESOURCE_MEM,
-       }
-};
-
-static struct platform_device sh7372_pfc_device = {
-       .name           = "pfc-sh7372",
-       .id             = -1,
-       .resource       = sh7372_pfc_resources,
-       .num_resources  = ARRAY_SIZE(sh7372_pfc_resources),
+static const struct resource pfc_resources[] = {
+       DEFINE_RES_MEM(0xe6050000, 0x8000),
+       DEFINE_RES_MEM(0xe605800c, 0x001c),
 };
 
 void __init sh7372_pinmux_init(void)
 {
-       platform_device_register(&sh7372_pfc_device);
+       platform_device_register_simple("pfc-sh7372", -1, pfc_resources,
+                                       ARRAY_SIZE(pfc_resources));
 }
 
 /* SCIFA0 */