diff options
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index eb7958c675a8..920a6f929c8b 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -812,7 +812,7 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) | |||
812 | } | 812 | } |
813 | 813 | ||
814 | /* | 814 | /* |
815 | * Here we define a transistion notifier so that we can update all of our | 815 | * Here we define a transition notifier so that we can update all of our |
816 | * ports' baud rate when the peripheral clock changes. | 816 | * ports' baud rate when the peripheral clock changes. |
817 | */ | 817 | */ |
818 | static int sci_notifier(struct notifier_block *self, | 818 | static int sci_notifier(struct notifier_block *self, |
@@ -1836,6 +1836,12 @@ static int __devinit serial_console_setup(struct console *co, char *options) | |||
1836 | sci_port = &sci_ports[co->index]; | 1836 | sci_port = &sci_ports[co->index]; |
1837 | port = &sci_port->port; | 1837 | port = &sci_port->port; |
1838 | 1838 | ||
1839 | /* | ||
1840 | * Refuse to handle uninitialized ports. | ||
1841 | */ | ||
1842 | if (!port->ops) | ||
1843 | return -ENODEV; | ||
1844 | |||
1839 | ret = sci_remap_port(port); | 1845 | ret = sci_remap_port(port); |
1840 | if (unlikely(ret != 0)) | 1846 | if (unlikely(ret != 0)) |
1841 | return ret; | 1847 | return ret; |
@@ -1866,13 +1872,6 @@ static struct console serial_console = { | |||
1866 | .data = &sci_uart_driver, | 1872 | .data = &sci_uart_driver, |
1867 | }; | 1873 | }; |
1868 | 1874 | ||
1869 | static int __init sci_console_init(void) | ||
1870 | { | ||
1871 | register_console(&serial_console); | ||
1872 | return 0; | ||
1873 | } | ||
1874 | console_initcall(sci_console_init); | ||
1875 | |||
1876 | static struct console early_serial_console = { | 1875 | static struct console early_serial_console = { |
1877 | .name = "early_ttySC", | 1876 | .name = "early_ttySC", |
1878 | .write = serial_console_write, | 1877 | .write = serial_console_write, |
@@ -1901,18 +1900,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev) | |||
1901 | register_console(&early_serial_console); | 1900 | register_console(&early_serial_console); |
1902 | return 0; | 1901 | return 0; |
1903 | } | 1902 | } |
1903 | |||
1904 | #define SCI_CONSOLE (&serial_console) | ||
1905 | |||
1904 | #else | 1906 | #else |
1905 | static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) | 1907 | static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) |
1906 | { | 1908 | { |
1907 | return -EINVAL; | 1909 | return -EINVAL; |
1908 | } | 1910 | } |
1909 | #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ | ||
1910 | 1911 | ||
1911 | #if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) | 1912 | #define SCI_CONSOLE NULL |
1912 | #define SCI_CONSOLE (&serial_console) | 1913 | |
1913 | #else | 1914 | #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ |
1914 | #define SCI_CONSOLE 0 | ||
1915 | #endif | ||
1916 | 1915 | ||
1917 | static char banner[] __initdata = | 1916 | static char banner[] __initdata = |
1918 | KERN_INFO "SuperH SCI(F) driver initialized\n"; | 1917 | KERN_INFO "SuperH SCI(F) driver initialized\n"; |