aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/serial.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-05-28 18:44:54 -0400
committerTony Lindgren <tony@atomide.com>2009-05-28 18:44:54 -0400
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 a0a280377a8c..fddbc4e1b231 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 =
469static inline void omap_uart_idle_init(struct omap_uart_state *uart) {} 469static inline void omap_uart_idle_init(struct omap_uart_state *uart) {}
470#endif /* CONFIG_PM */ 470#endif /* CONFIG_PM */
471 471
472static struct platform_device serial_device = {
473 .name = "serial8250",
474 .id = PLAT8250_DEV_PLATFORM,
475 .dev = {
476 .platform_data = serial_platform_data,
477 },
478};
479
472void __init omap_serial_init(void) 480void __init omap_serial_init(void)
473{ 481{
474 int i; 482 int i, err;
475 const struct omap_uart_config *info; 483 const struct omap_uart_config *info;
476 char name[16]; 484 char name[16];
477 485
@@ -522,27 +530,14 @@ void __init omap_serial_init(void)
522 omap_uart_reset(uart); 530 omap_uart_reset(uart);
523 omap_uart_idle_init(uart); 531 omap_uart_idle_init(uart);
524 } 532 }
525}
526
527static struct platform_device serial_device = {
528 .name = "serial8250",
529 .id = PLAT8250_DEV_PLATFORM,
530 .dev = {
531 .platform_data = serial_platform_data,
532 },
533};
534 533
535static int __init omap_init(void) 534 err = platform_device_register(&serial_device);
536{
537 int ret;
538
539 ret = platform_device_register(&serial_device);
540 535
541#ifdef CONFIG_PM 536#ifdef CONFIG_PM
542 if (!ret) 537 if (!err)
543 ret = sysfs_create_file(&serial_device.dev.kobj, 538 err = sysfs_create_file(&serial_device.dev.kobj,
544 &sleep_timeout_attr.attr); 539 &sleep_timeout_attr.attr);
545#endif 540#endif
546 return ret; 541
547} 542}
548arch_initcall(omap_init); 543