diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-07 19:48:45 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-07 19:48:45 (GMT) |
commit | 26cf445721763d61b08ce394f8bdbd4c5610b563 (patch) | |
tree | a26099dd232b5d0071604787a9eb27b37602645f /drivers | |
parent | 8b9686ff4ddfdf45662024edd567920e6db87beb (diff) | |
parent | 99b662e511e08230e8422e77cbe4fd31ed173df6 (diff) | |
download | linux-26cf445721763d61b08ce394f8bdbd4c5610b563.tar.xz |
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')
-rw-r--r-- | drivers/dma/shdma.c | 7 | ||||
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 25 |
2 files changed, 18 insertions, 14 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 6451b58..d50da41 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -865,7 +865,12 @@ static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev) static irqreturn_t sh_dmae_err(int irq, void *data) { - return IRQ_RETVAL(sh_dmae_reset(data)); + struct sh_dmae_device *shdev = data; + + if (dmaor_read(shdev) & DMAOR_AE) + return IRQ_RETVAL(sh_dmae_reset(data)); + else + return IRQ_NONE; } static void dmae_do_tasklet(unsigned long data) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index a7b083f..920a6f9 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) sci_port = &sci_ports[co->index]; port = &sci_port->port; + /* + * Refuse to handle uninitialized ports. + */ + if (!port->ops) + return -ENODEV; + ret = sci_remap_port(port); if (unlikely(ret != 0)) return ret; @@ -1866,13 +1872,6 @@ static struct console serial_console = { .data = &sci_uart_driver, }; -static int __init sci_console_init(void) -{ - register_console(&serial_console); - return 0; -} -console_initcall(sci_console_init); - static struct console early_serial_console = { .name = "early_ttySC", .write = serial_console_write, @@ -1901,18 +1900,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev) register_console(&early_serial_console); return 0; } + +#define SCI_CONSOLE (&serial_console) + #else static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) { return -EINVAL; } -#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ -#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) -#define SCI_CONSOLE (&serial_console) -#else -#define SCI_CONSOLE 0 -#endif +#define SCI_CONSOLE NULL + +#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ static char banner[] __initdata = KERN_INFO "SuperH SCI(F) driver initialized\n"; |