Skip to contentSkip to conversation

OMAP2: Serial: Remove arch_initcall dependency

PATCH New Pandita, Vikram 2 participants 2 messages May 20, 2009 – May 21, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP2: Serial: Remove arch_initcall dependency

From: Vikram Pandita <[email protected]>

Move platform_device_register() for serial device to omap_serial_init()

There is no need to have arch_initcall() dependency in serial as already board files call the function omap_serial_init()

---
 arch/arm/mach-omap2/serial.c |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)
arch/arm/mach-omap2/serial.c +9 -13
index 4dcf39c..3c2d325 100644
@@ -98,6 +98,14 @@ void omap_serial_enable_clocks(int enable)
 	}
 }
 
+static struct platform_device serial_device = {
+	.name			= "serial8250",
+	.id			= PLAT8250_DEV_PLATFORM,
+	.dev			= {
+		.platform_data	= serial_platform_data,
+	},
+};
+
 void __init omap_serial_init(void)
 {
 	int i;
@@ -142,18 +150,6 @@ void __init omap_serial_init(void)
 
 		omap_serial_reset(p);
 	}
-}
 
-static struct platform_device serial_device = {
-	.name			= "serial8250",
-	.id			= PLAT8250_DEV_PLATFORM,
-	.dev			= {
-		.platform_data	= serial_platform_data,
-	},
-};
-
-static int __init omap_init(void)
-{
-	return platform_device_register(&serial_device);
+	platform_device_register(&serial_device);
 }
-arch_initcall(omap_init);
Signature · 1 line
1.6.0.3.613.g9f8f13