aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/serial.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-05-28 15:44:54 -0700
committerTony Lindgren <tony@atomide.com>2009-05-28 15:44:54 -0700
commit970a724d9173526512ebd8be991a4cbe18b7aace (patch)
tree7541c2b34e82ccabb068bdae530936838a71fad8 /arch/arm/mach-omap2/serial.c
parentc81592ba1b012d555d0cb7ec711afda89c327469 (diff)
parent4a899d5e93fd974952492cd4a09e98b209d1ad58 (diff)
Merge branch 'omap3-upstream' into for-next
Conflicts: arch/arm/mach-omap2/serial.c
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r--arch/arm/mach-omap2/serial.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index a0a280377a8..fddbc4e1b23 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -469,9 +469,17 @@ static struct kobj_attribute sleep_timeout_attr =
static inline void omap_uart_idle_init(struct omap_uart_state *uart) {}
#endif /* CONFIG_PM */
+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;
+ int i, err;
const struct omap_uart_config *info;
char name[16];
@@ -522,27 +530,14 @@ void __init omap_serial_init(void)
omap_uart_reset(uart);
omap_uart_idle_init(uart);
}
-}
-
-static struct platform_device serial_device = {
- .name = "serial8250",
- .id = PLAT8250_DEV_PLATFORM,
- .dev = {
- .platform_data = serial_platform_data,
- },
-};
-static int __init omap_init(void)
-{
- int ret;
-
- ret = platform_device_register(&serial_device);
+ err = platform_device_register(&serial_device);
#ifdef CONFIG_PM
- if (!ret)
- ret = sysfs_create_file(&serial_device.dev.kobj,
+ if (!err)
+ err = sysfs_create_file(&serial_device.dev.kobj,
&sleep_timeout_attr.attr);
#endif
- return ret;
+
}
-arch_initcall(omap_init);
+