Ver Fonte

ARM: shmobile: armadillo800eva legacy: Use rmobile_add_devices_to_domains()

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>
Geert Uytterhoeven há 11 anos atrás
pai
commit
834720dbf0
1 ficheiros alterados com 6 adições e 2 exclusões
  1. 6 2
      arch/arm/mach-shmobile/board-armadillo800eva.c

+ 6 - 2
arch/arm/mach-shmobile/board-armadillo800eva.c

@@ -1231,6 +1231,10 @@ clock_error:
 #define GPIO_PORT8CR	IOMEM(0xe6050008)
 #define GPIO_PORT8CR	IOMEM(0xe6050008)
 static void __init eva_init(void)
 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;
 	struct platform_device *usb = NULL;
 
 
 	regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
 	regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
@@ -1316,8 +1320,8 @@ static void __init eva_init(void)
 	platform_add_devices(eva_devices,
 	platform_add_devices(eva_devices,
 			     ARRAY_SIZE(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)
 	if (usb)
 		rmobile_add_device_to_domain("A3SP", usb);
 		rmobile_add_device_to_domain("A3SP", usb);