diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2005-07-28 14:42:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-04 22:22:18 -0400 |
commit | 58e0276245f6c60119f0384e7eca576b08aa89e2 (patch) | |
tree | b905f552f8995f0a9857c5948491054bb7093cd2 /drivers/serial | |
parent | 71df30f8e3e97fde573c41df063c2d66c1ad01b0 (diff) |
[ACPI] 8250 driver now checks for acpi_register_gsi() errors
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250_acpi.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/serial/8250_acpi.c b/drivers/serial/8250_acpi.c index 6b9ead28851..a802bdce6e5 100644 --- a/drivers/serial/8250_acpi.c +++ b/drivers/serial/8250_acpi.c @@ -47,18 +47,30 @@ static acpi_status acpi_serial_port(struct uart_port *port, static acpi_status acpi_serial_ext_irq(struct uart_port *port, struct acpi_resource_ext_irq *ext_irq) { - if (ext_irq->number_of_interrupts > 0) - port->irq = acpi_register_gsi(ext_irq->interrupts[0], + int rc; + + if (ext_irq->number_of_interrupts > 0) { + rc = acpi_register_gsi(ext_irq->interrupts[0], ext_irq->edge_level, ext_irq->active_high_low); + if (rc < 0) + return AE_ERROR; + port->irq = rc; + } return AE_OK; } static acpi_status acpi_serial_irq(struct uart_port *port, struct acpi_resource_irq *irq) { - if (irq->number_of_interrupts > 0) - port->irq = acpi_register_gsi(irq->interrupts[0], + int rc; + + if (irq->number_of_interrupts > 0) { + rc = acpi_register_gsi(irq->interrupts[0], irq->edge_level, irq->active_high_low); + if (rc < 0) + return AE_ERROR; + port->irq = rc; + } return AE_OK; } |