diff options
author | Magnus Damm <damm@opensource.se> | 2013-04-03 02:32:58 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-05 04:18:22 -0400 |
commit | 3404622a77f90168fd1190c64e92edf548c0f8f0 (patch) | |
tree | 47e4d2ca8d492f5d1d4278178f0f95f015f5d351 /arch/arm/mach-shmobile/setup-r8a7740.c | |
parent | d93906b869dd9444823f04ea64a585143f18a26e (diff) |
ARM: shmobile: r8a7740 pinmux platform device cleanup
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>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7740.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 326a4ab0bd5f..3a6b6fe7b6c0 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -70,29 +70,15 @@ void __init r8a7740_map_io(void) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | /* PFC */ | 72 | /* PFC */ |
73 | static struct resource r8a7740_pfc_resources[] = { | 73 | static const struct resource pfc_resources[] = { |
74 | [0] = { | 74 | DEFINE_RES_MEM(0xe6050000, 0x8000), |
75 | .start = 0xe6050000, | 75 | DEFINE_RES_MEM(0xe605800c, 0x0020), |
76 | .end = 0xe6057fff, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, | ||
79 | [1] = { | ||
80 | .start = 0xe605800c, | ||
81 | .end = 0xe605802b, | ||
82 | .flags = IORESOURCE_MEM, | ||
83 | } | ||
84 | }; | ||
85 | |||
86 | static struct platform_device r8a7740_pfc_device = { | ||
87 | .name = "pfc-r8a7740", | ||
88 | .id = -1, | ||
89 | .resource = r8a7740_pfc_resources, | ||
90 | .num_resources = ARRAY_SIZE(r8a7740_pfc_resources), | ||
91 | }; | 76 | }; |
92 | 77 | ||
93 | void __init r8a7740_pinmux_init(void) | 78 | void __init r8a7740_pinmux_init(void) |
94 | { | 79 | { |
95 | platform_device_register(&r8a7740_pfc_device); | 80 | platform_device_register_simple("pfc-r8a7740", -1, pfc_resources, |
81 | ARRAY_SIZE(pfc_resources)); | ||
96 | } | 82 | } |
97 | 83 | ||
98 | static struct renesas_intc_irqpin_config irqpin0_platform_data = { | 84 | static struct renesas_intc_irqpin_config irqpin0_platform_data = { |