aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-06-27 04:09:01 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-07-16 21:02:21 -0400
commit474f67587345bf7b32bbd9d2b5621e85500103c5 (patch)
treeee4f4da4d3f91c4331feccff5b0b20f4f8a277a1 /arch/arm
parentc9031fbb35bd44d99c5cfe7d3c97ec238d63643a (diff)
ARM: shmobile: sh73a0 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> [ remove const from resource pfc_resources to avoid section miss-match reported by 4.4.5 ] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 96e7ca1e4e11..79a6040774a4 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -61,29 +61,16 @@ void __init sh73a0_map_io(void)
61 iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); 61 iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
62} 62}
63 63
64static struct resource sh73a0_pfc_resources[] = { 64/* PFC */
65 [0] = { 65static struct resource pfc_resources[] __initdata = {
66 .start = 0xe6050000, 66 DEFINE_RES_MEM(0xe6050000, 0x8000),
67 .end = 0xe6057fff, 67 DEFINE_RES_MEM(0xe605801c, 0x000c),
68 .flags = IORESOURCE_MEM,
69 },
70 [1] = {
71 .start = 0xe605801c,
72 .end = 0xe6058027,
73 .flags = IORESOURCE_MEM,
74 }
75};
76
77static struct platform_device sh73a0_pfc_device = {
78 .name = "pfc-sh73a0",
79 .id = -1,
80 .resource = sh73a0_pfc_resources,
81 .num_resources = ARRAY_SIZE(sh73a0_pfc_resources),
82}; 68};
83 69
84void __init sh73a0_pinmux_init(void) 70void __init sh73a0_pinmux_init(void)
85{ 71{
86 platform_device_register(&sh73a0_pfc_device); 72 platform_device_register_simple("pfc-sh73a0", -1, pfc_resources,
73 ARRAY_SIZE(pfc_resources));
87} 74}
88 75
89static struct plat_sci_port scif0_platform_data = { 76static struct plat_sci_port scif0_platform_data = {