Skip to content

Commit

Permalink
ARM: shmobile: armadillo800eva legacy: Use rmobile_add_devices_to_dom…
Browse files Browse the repository at this point in the history
…ains()

Use a table and the rmobile_add_devices_to_domains() helper function to
add all platform devices to their power domains at once, which is more
size-efficient than calling rmobile_add_device_to_domain() explicitly
for all devices individually.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Geert Uytterhoeven authored and Simon Horman committed Sep 9, 2014
1 parent 7534909 commit 834720d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/arm/mach-shmobile/board-armadillo800eva.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,10 @@ static void __init eva_clock_init(void)
#define GPIO_PORT8CR IOMEM(0xe6050008)
static void __init eva_init(void)
{
static struct pm_domain_device domain_devices[] __initdata = {
{ "A4LC", &lcdc0_device },
{ "A4LC", &hdmi_lcdc_device },
};
struct platform_device *usb = NULL;

regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
Expand Down Expand Up @@ -1316,8 +1320,8 @@ static void __init eva_init(void)
platform_add_devices(eva_devices,
ARRAY_SIZE(eva_devices));

rmobile_add_device_to_domain("A4LC", &lcdc0_device);
rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
rmobile_add_devices_to_domains(domain_devices,
ARRAY_SIZE(domain_devices));
if (usb)
rmobile_add_device_to_domain("A3SP", usb);

Expand Down

0 comments on commit 834720d

Please sign in to comment.