aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-11-14 19:59:59 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 21:45:41 -0500
commite02f5f52cafbea013817d81f1acc4baf50d6324b (patch)
treee3599129422f0c655921180910eec3f6f551eff5 /drivers/serial
parent57510c2f934a05c53232814761a058399b2ca282 (diff)
serial: only use PNP IRQ if it's valid
"Luming Yu" <luming.yu@gmail.com> says: There is a "ttyS1 irq is -1" problem observed on tiger4 which cause the serial port broken. It is because that there is __no__ ACPI IRQ resource assigned for the serial port. So the value of the IRQ for the port is never changed since it got initialized to -1. If PNP supplies a valid IRQ, use it. Otherwise, leave port.irq == 0, which means "no IRQ" to the serial core. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Yu Luming <luming.yu@intel.com> Acked-by: Matthew Wilcox <matthew@wil.cx> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250_pnp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c
index ad0755919bcc..1de098e75497 100644
--- a/drivers/serial/8250_pnp.c
+++ b/drivers/serial/8250_pnp.c
@@ -439,7 +439,8 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
439 } 439 }
440 440
441 memset(&port, 0, sizeof(struct uart_port)); 441 memset(&port, 0, sizeof(struct uart_port));
442 port.irq = pnp_irq(dev, 0); 442 if (pnp_irq_valid(dev, 0))
443 port.irq = pnp_irq(dev, 0);
443 if (pnp_port_valid(dev, 0)) { 444 if (pnp_port_valid(dev, 0)) {
444 port.iobase = pnp_port_start(dev, 0); 445 port.iobase = pnp_port_start(dev, 0);
445 port.iotype = UPIO_PORT; 446 port.iotype = UPIO_PORT;