diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-07 15:48:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-07 15:48:45 -0400 |
commit | 26cf445721763d61b08ce394f8bdbd4c5610b563 (patch) | |
tree | a26099dd232b5d0071604787a9eb27b37602645f /drivers/tty | |
parent | 8b9686ff4ddfdf45662024edd567920e6db87beb (diff) | |
parent | 99b662e511e08230e8422e77cbe4fd31ed173df6 (diff) |
Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: select ARCH_NO_SYSDEV_OPS.
sh: fix build error in board-sh7757lcr.c
sh: landisk: Remove whitespace
sh: landisk: Remove mv_nr_irqs
sh: sh-sci: Fix double initialization by serial_console_setup
serial: sh-sci: prevent setup of uninitialized serial console
dma: shdma: add checking the DMAOR_AE in sh_dmae_err
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index a7b083f4ea78..920a6f929c8b 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -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"; |