aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-r8a7740.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-04-03 02:32:58 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-06-05 04:18:22 -0400
commit3404622a77f90168fd1190c64e92edf548c0f8f0 (patch)
tree47e4d2ca8d492f5d1d4278178f0f95f015f5d351 /arch/arm/mach-shmobile/setup-r8a7740.c
parentd93906b869dd9444823f04ea64a585143f18a26e (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.c24
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 */
73static struct resource r8a7740_pfc_resources[] = { 73static 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
86static 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
93void __init r8a7740_pinmux_init(void) 78void __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
98static struct renesas_intc_irqpin_config irqpin0_platform_data = { 84static struct renesas_intc_irqpin_config irqpin0_platform_data = {