ARM: shmobile: r8a7779 pinmux platform device cleanup
authorMagnus Damm <damm@opensource.se>
Fri, 12 Apr 2013 12:21:29 +0000 (14:21 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 5 Jun 2013 08:17:13 +0000 (17:17 +0900)
Use DEFINE_RES_MEM() to save a couple of lines of code.

Signed-off-by: Magnus Damm <damm@opensource.se>
[lp: Don't declare r8a7779_pfc_resources as const]
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/setup-r8a7779.c

index b0b394842ea5011b31b678a8b53b012cea2580ba..dbb13f289e797a2a0679ae5bc08fbd9cc297089f 100644 (file)
@@ -65,11 +65,7 @@ void __init r8a7779_map_io(void)
 }
 
 static struct resource r8a7779_pfc_resources[] = {
-       [0] = {
-               .start  = 0xfffc0000,
-               .end    = 0xfffc023b,
-               .flags  = IORESOURCE_MEM,
-       },
+       DEFINE_RES_MEM(0xfffc0000, 0x023c),
 };
 
 static struct platform_device r8a7779_pfc_device = {
@@ -81,15 +77,8 @@ static struct platform_device r8a7779_pfc_device = {
 
 #define R8A7779_GPIO(idx, npins) \
 static struct resource r8a7779_gpio##idx##_resources[] = {             \
-       [0] = {                                                         \
-               .start  = 0xffc40000 + 0x1000 * (idx),                  \
-               .end    = 0xffc4002b + 0x1000 * (idx),                  \
-               .flags  = IORESOURCE_MEM,                               \
-       },                                                              \
-       [1] = {                                                         \
-               .start  = gic_iid(0xad + (idx)),                        \
-               .flags  = IORESOURCE_IRQ,                               \
-       }                                                               \
+       DEFINE_RES_MEM(0xffc40000 + (0x1000 * (idx)), 0x002c),          \
+       DEFINE_RES_IRQ(gic_iid(0xad + (idx))),                          \
 };                                                                     \
                                                                        \
 static struct gpio_rcar_config r8a7779_gpio##idx##_platform_data = {   \