From: Tony Lindgren <tony@atomide.com>
Date: Thu, 18 Aug 2005 09:19:36 +0000 (-0700)
Subject: ARM: OMAP: Change CONFIG_OMAP_SERIAL_WAKE to use late_initcall
X-Git-Tag: v2.6.13-omap1~16
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=791975edcf94f8113a0718ecfa8bceab1042918e;p=linux-2.6-omap-h63xx.git

ARM: OMAP: Change CONFIG_OMAP_SERIAL_WAKE to use late_initcall

Change CONFIG_OMAP_SERIAL_WAKE to use late_initcall. This avoids
need for early GPIO init.
---

diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 2bef59aee51..efcae93566d 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -259,7 +259,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr)
 	enable_irq_wake(OMAP_GPIO_IRQ(gpio_nr));
 }
 
-static void __init omap_serial_wakeup_init(void)
+static int __init omap_serial_wakeup_init(void)
 {
 	if (!cpu_is_omap16xx())
 		return;
@@ -270,15 +270,15 @@ static void __init omap_serial_wakeup_init(void)
 		omap_serial_set_port_wakeup(18);
 	if (uart3_ck != NULL)
 		omap_serial_set_port_wakeup(49);
+
+	return 0;
 }
+late_initcall(omap_serial_wakeup_init);
 
 #endif	/* CONFIG_OMAP_SERIAL_WAKE */
 
 static int __init omap_init(void)
 {
-#ifdef CONFIG_PM
-	omap_serial_wakeup_init();
-#endif
 	return platform_device_register(&serial_device);
 }
 arch_initcall(omap_init);
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h
index 5a493071053..fbd742d0c49 100644
--- a/include/asm-arm/arch-omap/pm.h
+++ b/include/asm-arm/arch-omap/pm.h
@@ -115,7 +115,6 @@ extern void omap1610_idle_loop_suspend(void);
 #ifdef CONFIG_OMAP_SERIAL_WAKE
 extern void omap_serial_wake_trigger(int enable);
 #else
-#define omap_serial_wakeup_init()	{}
 #define omap_serial_wake_trigger(x)	{}
 #endif	/* CONFIG_OMAP_SERIAL_WAKE */