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>
This commit is contained in:
parent
d93906b869
commit
3404622a77
1 changed files with 5 additions and 19 deletions
|
@ -70,29 +70,15 @@ void __init r8a7740_map_io(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PFC */
|
/* PFC */
|
||||||
static struct resource r8a7740_pfc_resources[] = {
|
static const struct resource pfc_resources[] = {
|
||||||
[0] = {
|
DEFINE_RES_MEM(0xe6050000, 0x8000),
|
||||||
.start = 0xe6050000,
|
DEFINE_RES_MEM(0xe605800c, 0x0020),
|
||||||
.end = 0xe6057fff,
|
|
||||||
.flags = IORESOURCE_MEM,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
.start = 0xe605800c,
|
|
||||||
.end = 0xe605802b,
|
|
||||||
.flags = IORESOURCE_MEM,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct platform_device r8a7740_pfc_device = {
|
|
||||||
.name = "pfc-r8a7740",
|
|
||||||
.id = -1,
|
|
||||||
.resource = r8a7740_pfc_resources,
|
|
||||||
.num_resources = ARRAY_SIZE(r8a7740_pfc_resources),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init r8a7740_pinmux_init(void)
|
void __init r8a7740_pinmux_init(void)
|
||||||
{
|
{
|
||||||
platform_device_register(&r8a7740_pfc_device);
|
platform_device_register_simple("pfc-r8a7740", -1, pfc_resources,
|
||||||
|
ARRAY_SIZE(pfc_resources));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct renesas_intc_irqpin_config irqpin0_platform_data = {
|
static struct renesas_intc_irqpin_config irqpin0_platform_data = {
|
||||||
|
|
Loading…
Reference in a new issue