diff options
author | Alan Cox <alan@linux.intel.com> | 2012-01-26 12:44:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-26 20:14:50 -0500 |
commit | d4e33fac2408d37f7b52e80ca2a89f9fb482914f (patch) | |
tree | dd25baa1bc251ad2aa61a07eda7f95a4d7094126 /drivers | |
parent | 3afbd89c9639c344300dcdd7d4e5e18dda559fd4 (diff) |
serial: Kill off NO_IRQ
We transform the offenders into a test of irq <= 0 which will be ok while
the ARM people get their platform sorted. Once that is done (or in a while
if they don't do it anyway) then we will change them all to !irq checks.
For arch specific drivers that are already using NO_IRQ = 0 we just test
against zero so we don't need to re-review them later.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/hvc/hvc_beat.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_rtas.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_udbg.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_xen.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvcs.c | 4 | ||||
-rw-r--r-- | drivers/tty/hvc/hvsi.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/21285.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/8250.c | 21 | ||||
-rw-r--r-- | drivers/tty/serial/m32r_sio.c | 11 | ||||
-rw-r--r-- | drivers/tty/serial/mpc52xx_uart.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/mux.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/pmac_zilog.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/sunzilog.c | 10 | ||||
-rw-r--r-- | drivers/tty/serial/ucc_uart.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/vr41xx_siu.c | 4 |
15 files changed, 30 insertions, 44 deletions
diff --git a/drivers/tty/hvc/hvc_beat.c b/drivers/tty/hvc/hvc_beat.c index 5fe4631e2a61..1560d235449e 100644 --- a/drivers/tty/hvc/hvc_beat.c +++ b/drivers/tty/hvc/hvc_beat.c | |||
@@ -113,7 +113,7 @@ static int __init hvc_beat_init(void) | |||
113 | if (!firmware_has_feature(FW_FEATURE_BEAT)) | 113 | if (!firmware_has_feature(FW_FEATURE_BEAT)) |
114 | return -ENODEV; | 114 | return -ENODEV; |
115 | 115 | ||
116 | hp = hvc_alloc(0, NO_IRQ, &hvc_beat_get_put_ops, 16); | 116 | hp = hvc_alloc(0, 0, &hvc_beat_get_put_ops, 16); |
117 | if (IS_ERR(hp)) | 117 | if (IS_ERR(hp)) |
118 | return PTR_ERR(hp); | 118 | return PTR_ERR(hp); |
119 | hvc_beat_dev = hp; | 119 | hvc_beat_dev = hp; |
diff --git a/drivers/tty/hvc/hvc_rtas.c b/drivers/tty/hvc/hvc_rtas.c index 61c4a61558d9..0069bb86ba49 100644 --- a/drivers/tty/hvc/hvc_rtas.c +++ b/drivers/tty/hvc/hvc_rtas.c | |||
@@ -94,7 +94,7 @@ static int __init hvc_rtas_init(void) | |||
94 | 94 | ||
95 | /* Allocate an hvc_struct for the console device we instantiated | 95 | /* Allocate an hvc_struct for the console device we instantiated |
96 | * earlier. Save off hp so that we can return it on exit */ | 96 | * earlier. Save off hp so that we can return it on exit */ |
97 | hp = hvc_alloc(hvc_rtas_cookie, NO_IRQ, &hvc_rtas_get_put_ops, 16); | 97 | hp = hvc_alloc(hvc_rtas_cookie, 0, &hvc_rtas_get_put_ops, 16); |
98 | if (IS_ERR(hp)) | 98 | if (IS_ERR(hp)) |
99 | return PTR_ERR(hp); | 99 | return PTR_ERR(hp); |
100 | 100 | ||
diff --git a/drivers/tty/hvc/hvc_udbg.c b/drivers/tty/hvc/hvc_udbg.c index b0957e61a7be..4c9b13e7748c 100644 --- a/drivers/tty/hvc/hvc_udbg.c +++ b/drivers/tty/hvc/hvc_udbg.c | |||
@@ -69,7 +69,7 @@ static int __init hvc_udbg_init(void) | |||
69 | 69 | ||
70 | BUG_ON(hvc_udbg_dev); | 70 | BUG_ON(hvc_udbg_dev); |
71 | 71 | ||
72 | hp = hvc_alloc(0, NO_IRQ, &hvc_udbg_ops, 16); | 72 | hp = hvc_alloc(0, 0, &hvc_udbg_ops, 16); |
73 | if (IS_ERR(hp)) | 73 | if (IS_ERR(hp)) |
74 | return PTR_ERR(hp); | 74 | return PTR_ERR(hp); |
75 | 75 | ||
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 52fdf60bdbe2..a1b0a75c3eae 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c | |||
@@ -176,7 +176,7 @@ static int __init xen_hvc_init(void) | |||
176 | xencons_irq = bind_evtchn_to_irq(xen_start_info->console.domU.evtchn); | 176 | xencons_irq = bind_evtchn_to_irq(xen_start_info->console.domU.evtchn); |
177 | } | 177 | } |
178 | if (xencons_irq < 0) | 178 | if (xencons_irq < 0) |
179 | xencons_irq = 0; /* NO_IRQ */ | 179 | xencons_irq = 0; |
180 | else | 180 | else |
181 | irq_set_noprobe(xencons_irq); | 181 | irq_set_noprobe(xencons_irq); |
182 | 182 | ||
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index b9040bec36bd..df7e7a0a5e6c 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
@@ -1203,7 +1203,7 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp) | |||
1203 | { | 1203 | { |
1204 | struct hvcs_struct *hvcsd; | 1204 | struct hvcs_struct *hvcsd; |
1205 | unsigned long flags; | 1205 | unsigned long flags; |
1206 | int irq = NO_IRQ; | 1206 | int irq; |
1207 | 1207 | ||
1208 | /* | 1208 | /* |
1209 | * Is someone trying to close the file associated with this device after | 1209 | * Is someone trying to close the file associated with this device after |
@@ -1264,7 +1264,7 @@ static void hvcs_hangup(struct tty_struct * tty) | |||
1264 | struct hvcs_struct *hvcsd = tty->driver_data; | 1264 | struct hvcs_struct *hvcsd = tty->driver_data; |
1265 | unsigned long flags; | 1265 | unsigned long flags; |
1266 | int temp_open_count; | 1266 | int temp_open_count; |
1267 | int irq = NO_IRQ; | 1267 | int irq; |
1268 | 1268 | ||
1269 | spin_lock_irqsave(&hvcsd->lock, flags); | 1269 | spin_lock_irqsave(&hvcsd->lock, flags); |
1270 | /* Preserve this so that we know how many kref refs to put */ | 1270 | /* Preserve this so that we know how many kref refs to put */ |
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c index cdfa3e02d627..1b5f28bd7930 100644 --- a/drivers/tty/hvc/hvsi.c +++ b/drivers/tty/hvc/hvsi.c | |||
@@ -1237,7 +1237,7 @@ static int __init hvsi_console_init(void) | |||
1237 | hp->state = HVSI_CLOSED; | 1237 | hp->state = HVSI_CLOSED; |
1238 | hp->vtermno = *vtermno; | 1238 | hp->vtermno = *vtermno; |
1239 | hp->virq = irq_create_mapping(NULL, irq[0]); | 1239 | hp->virq = irq_create_mapping(NULL, irq[0]); |
1240 | if (hp->virq == NO_IRQ) { | 1240 | if (hp->virq == 0) { |
1241 | printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n", | 1241 | printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n", |
1242 | __func__, irq[0]); | 1242 | __func__, irq[0]); |
1243 | continue; | 1243 | continue; |
diff --git a/drivers/tty/serial/21285.c b/drivers/tty/serial/21285.c index 1b37626e8f13..f899996b4363 100644 --- a/drivers/tty/serial/21285.c +++ b/drivers/tty/serial/21285.c | |||
@@ -331,7 +331,7 @@ static int serial21285_verify_port(struct uart_port *port, struct serial_struct | |||
331 | int ret = 0; | 331 | int ret = 0; |
332 | if (ser->type != PORT_UNKNOWN && ser->type != PORT_21285) | 332 | if (ser->type != PORT_UNKNOWN && ser->type != PORT_21285) |
333 | ret = -EINVAL; | 333 | ret = -EINVAL; |
334 | if (ser->irq != NO_IRQ) | 334 | if (ser->irq <= 0) |
335 | ret = -EINVAL; | 335 | ret = -EINVAL; |
336 | if (ser->baud_base != port->uartclk / 16) | 336 | if (ser->baud_base != port->uartclk / 16) |
337 | ret = -EINVAL; | 337 | ret = -EINVAL; |
@@ -360,7 +360,7 @@ static struct uart_ops serial21285_ops = { | |||
360 | static struct uart_port serial21285_port = { | 360 | static struct uart_port serial21285_port = { |
361 | .mapbase = 0x42000160, | 361 | .mapbase = 0x42000160, |
362 | .iotype = UPIO_MEM, | 362 | .iotype = UPIO_MEM, |
363 | .irq = NO_IRQ, | 363 | .irq = 0, |
364 | .fifosize = 16, | 364 | .fifosize = 16, |
365 | .ops = &serial21285_ops, | 365 | .ops = &serial21285_ops, |
366 | .flags = UPF_BOOT_AUTOCONF, | 366 | .flags = UPF_BOOT_AUTOCONF, |
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index 9f50c4e3c2be..b0eb96139324 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
@@ -86,13 +86,6 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */ | |||
86 | #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) | 86 | #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) |
87 | 87 | ||
88 | 88 | ||
89 | /* | ||
90 | * We default to IRQ0 for the "no irq" hack. Some | ||
91 | * machine types want others as well - they're free | ||
92 | * to redefine this in their header file. | ||
93 | */ | ||
94 | #define is_real_interrupt(irq) ((irq) != 0) | ||
95 | |||
96 | #ifdef CONFIG_SERIAL_8250_DETECT_IRQ | 89 | #ifdef CONFIG_SERIAL_8250_DETECT_IRQ |
97 | #define CONFIG_SERIAL_DETECT_IRQ 1 | 90 | #define CONFIG_SERIAL_DETECT_IRQ 1 |
98 | #endif | 91 | #endif |
@@ -1750,7 +1743,7 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1750 | * Must disable interrupts or else we risk racing with the interrupt | 1743 | * Must disable interrupts or else we risk racing with the interrupt |
1751 | * based handler. | 1744 | * based handler. |
1752 | */ | 1745 | */ |
1753 | if (is_real_interrupt(up->port.irq)) { | 1746 | if (up->port.irq) { |
1754 | ier = serial_in(up, UART_IER); | 1747 | ier = serial_in(up, UART_IER); |
1755 | serial_out(up, UART_IER, 0); | 1748 | serial_out(up, UART_IER, 0); |
1756 | } | 1749 | } |
@@ -1775,7 +1768,7 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1775 | if (!(iir & UART_IIR_NO_INT)) | 1768 | if (!(iir & UART_IIR_NO_INT)) |
1776 | serial8250_tx_chars(up); | 1769 | serial8250_tx_chars(up); |
1777 | 1770 | ||
1778 | if (is_real_interrupt(up->port.irq)) | 1771 | if (up->port.irq) |
1779 | serial_out(up, UART_IER, ier); | 1772 | serial_out(up, UART_IER, ier); |
1780 | 1773 | ||
1781 | spin_unlock_irqrestore(&up->port.lock, flags); | 1774 | spin_unlock_irqrestore(&up->port.lock, flags); |
@@ -2028,7 +2021,7 @@ static int serial8250_startup(struct uart_port *port) | |||
2028 | serial_outp(up, UART_LCR, 0); | 2021 | serial_outp(up, UART_LCR, 0); |
2029 | } | 2022 | } |
2030 | 2023 | ||
2031 | if (is_real_interrupt(up->port.irq)) { | 2024 | if (up->port.irq) { |
2032 | unsigned char iir1; | 2025 | unsigned char iir1; |
2033 | /* | 2026 | /* |
2034 | * Test for UARTs that do not reassert THRE when the | 2027 | * Test for UARTs that do not reassert THRE when the |
@@ -2083,7 +2076,7 @@ static int serial8250_startup(struct uart_port *port) | |||
2083 | * hardware interrupt, we use a timer-based system. The original | 2076 | * hardware interrupt, we use a timer-based system. The original |
2084 | * driver used to do this with IRQ0. | 2077 | * driver used to do this with IRQ0. |
2085 | */ | 2078 | */ |
2086 | if (!is_real_interrupt(up->port.irq)) { | 2079 | if (!up->port.irq) { |
2087 | up->timer.data = (unsigned long)up; | 2080 | up->timer.data = (unsigned long)up; |
2088 | mod_timer(&up->timer, jiffies + uart_poll_timeout(port)); | 2081 | mod_timer(&up->timer, jiffies + uart_poll_timeout(port)); |
2089 | } else { | 2082 | } else { |
@@ -2099,13 +2092,13 @@ static int serial8250_startup(struct uart_port *port) | |||
2099 | 2092 | ||
2100 | spin_lock_irqsave(&up->port.lock, flags); | 2093 | spin_lock_irqsave(&up->port.lock, flags); |
2101 | if (up->port.flags & UPF_FOURPORT) { | 2094 | if (up->port.flags & UPF_FOURPORT) { |
2102 | if (!is_real_interrupt(up->port.irq)) | 2095 | if (!up->port.irq) |
2103 | up->port.mctrl |= TIOCM_OUT1; | 2096 | up->port.mctrl |= TIOCM_OUT1; |
2104 | } else | 2097 | } else |
2105 | /* | 2098 | /* |
2106 | * Most PC uarts need OUT2 raised to enable interrupts. | 2099 | * Most PC uarts need OUT2 raised to enable interrupts. |
2107 | */ | 2100 | */ |
2108 | if (is_real_interrupt(up->port.irq)) | 2101 | if (up->port.irq) |
2109 | up->port.mctrl |= TIOCM_OUT2; | 2102 | up->port.mctrl |= TIOCM_OUT2; |
2110 | 2103 | ||
2111 | serial8250_set_mctrl(&up->port, up->port.mctrl); | 2104 | serial8250_set_mctrl(&up->port, up->port.mctrl); |
@@ -2223,7 +2216,7 @@ static void serial8250_shutdown(struct uart_port *port) | |||
2223 | 2216 | ||
2224 | del_timer_sync(&up->timer); | 2217 | del_timer_sync(&up->timer); |
2225 | up->timer.function = serial8250_timeout; | 2218 | up->timer.function = serial8250_timeout; |
2226 | if (is_real_interrupt(up->port.irq)) | 2219 | if (up->port.irq) |
2227 | serial_unlink_irq_chain(up); | 2220 | serial_unlink_irq_chain(up); |
2228 | } | 2221 | } |
2229 | 2222 | ||
diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 94a6792bf97b..e465dda63edf 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c | |||
@@ -70,13 +70,6 @@ | |||
70 | 70 | ||
71 | #define PASS_LIMIT 256 | 71 | #define PASS_LIMIT 256 |
72 | 72 | ||
73 | /* | ||
74 | * We default to IRQ0 for the "no irq" hack. Some | ||
75 | * machine types want others as well - they're free | ||
76 | * to redefine this in their header file. | ||
77 | */ | ||
78 | #define is_real_interrupt(irq) ((irq) != 0) | ||
79 | |||
80 | #define BASE_BAUD 115200 | 73 | #define BASE_BAUD 115200 |
81 | 74 | ||
82 | /* Standard COM flags */ | 75 | /* Standard COM flags */ |
@@ -640,7 +633,7 @@ static int m32r_sio_startup(struct uart_port *port) | |||
640 | * hardware interrupt, we use a timer-based system. The original | 633 | * hardware interrupt, we use a timer-based system. The original |
641 | * driver used to do this with IRQ0. | 634 | * driver used to do this with IRQ0. |
642 | */ | 635 | */ |
643 | if (!is_real_interrupt(up->port.irq)) { | 636 | if (!up->port.irq) { |
644 | unsigned int timeout = up->port.timeout; | 637 | unsigned int timeout = up->port.timeout; |
645 | 638 | ||
646 | timeout = timeout > 6 ? (timeout / 2 - 2) : 1; | 639 | timeout = timeout > 6 ? (timeout / 2 - 2) : 1; |
@@ -687,7 +680,7 @@ static void m32r_sio_shutdown(struct uart_port *port) | |||
687 | 680 | ||
688 | sio_init(); | 681 | sio_init(); |
689 | 682 | ||
690 | if (!is_real_interrupt(up->port.irq)) | 683 | if (!up->port.irq) |
691 | del_timer_sync(&up->timer); | 684 | del_timer_sync(&up->timer); |
692 | else | 685 | else |
693 | serial_unlink_irq_chain(up); | 686 | serial_unlink_irq_chain(up); |
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c index 1093a88a1fe3..e9a770d77a6e 100644 --- a/drivers/tty/serial/mpc52xx_uart.c +++ b/drivers/tty/serial/mpc52xx_uart.c | |||
@@ -507,7 +507,7 @@ static int __init mpc512x_psc_fifoc_init(void) | |||
507 | 507 | ||
508 | psc_fifoc_irq = irq_of_parse_and_map(np, 0); | 508 | psc_fifoc_irq = irq_of_parse_and_map(np, 0); |
509 | of_node_put(np); | 509 | of_node_put(np); |
510 | if (psc_fifoc_irq == NO_IRQ) { | 510 | if (psc_fifoc_irq == 0) { |
511 | pr_err("%s: Can't get FIFOC irq\n", __func__); | 511 | pr_err("%s: Can't get FIFOC irq\n", __func__); |
512 | iounmap(psc_fifoc); | 512 | iounmap(psc_fifoc); |
513 | return -ENODEV; | 513 | return -ENODEV; |
@@ -1354,7 +1354,7 @@ static int __devinit mpc52xx_uart_of_probe(struct platform_device *op) | |||
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | psc_ops->get_irq(port, op->dev.of_node); | 1356 | psc_ops->get_irq(port, op->dev.of_node); |
1357 | if (port->irq == NO_IRQ) { | 1357 | if (port->irq == 0) { |
1358 | dev_dbg(&op->dev, "Could not get irq\n"); | 1358 | dev_dbg(&op->dev, "Could not get irq\n"); |
1359 | return -EINVAL; | 1359 | return -EINVAL; |
1360 | } | 1360 | } |
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c index 06f6aefd5ba6..c61d950e07c1 100644 --- a/drivers/tty/serial/mux.c +++ b/drivers/tty/serial/mux.c | |||
@@ -499,7 +499,7 @@ static int __init mux_probe(struct parisc_device *dev) | |||
499 | port->membase = ioremap_nocache(port->mapbase, MUX_LINE_OFFSET); | 499 | port->membase = ioremap_nocache(port->mapbase, MUX_LINE_OFFSET); |
500 | port->iotype = UPIO_MEM; | 500 | port->iotype = UPIO_MEM; |
501 | port->type = PORT_MUX; | 501 | port->type = PORT_MUX; |
502 | port->irq = NO_IRQ; | 502 | port->irq = 0; |
503 | port->uartclk = 0; | 503 | port->uartclk = 0; |
504 | port->fifosize = MUX_FIFO_SIZE; | 504 | port->fifosize = MUX_FIFO_SIZE; |
505 | port->ops = &mux_pops; | 505 | port->ops = &mux_pops; |
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index e9c2dfe471a2..08ebe901bb59 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c | |||
@@ -1506,7 +1506,7 @@ no_dma: | |||
1506 | * fixed up interrupt info, but we use the device-tree directly | 1506 | * fixed up interrupt info, but we use the device-tree directly |
1507 | * here due to early probing so we need the fixup too. | 1507 | * here due to early probing so we need the fixup too. |
1508 | */ | 1508 | */ |
1509 | if (uap->port.irq == NO_IRQ && | 1509 | if (uap->port.irq == 0 && |
1510 | np->parent && np->parent->parent && | 1510 | np->parent && np->parent->parent && |
1511 | of_device_is_compatible(np->parent->parent, "gatwick")) { | 1511 | of_device_is_compatible(np->parent->parent, "gatwick")) { |
1512 | /* IRQs on gatwick are offset by 64 */ | 1512 | /* IRQs on gatwick are offset by 64 */ |
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c index 8e916e76b7b5..5a47d1b196d8 100644 --- a/drivers/tty/serial/sunzilog.c +++ b/drivers/tty/serial/sunzilog.c | |||
@@ -1397,7 +1397,7 @@ static void __devinit sunzilog_init_hw(struct uart_sunzilog_port *up) | |||
1397 | #endif | 1397 | #endif |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | static int zilog_irq = -1; | 1400 | static int zilog_irq; |
1401 | 1401 | ||
1402 | static int __devinit zs_probe(struct platform_device *op) | 1402 | static int __devinit zs_probe(struct platform_device *op) |
1403 | { | 1403 | { |
@@ -1425,7 +1425,7 @@ static int __devinit zs_probe(struct platform_device *op) | |||
1425 | 1425 | ||
1426 | rp = sunzilog_chip_regs[inst]; | 1426 | rp = sunzilog_chip_regs[inst]; |
1427 | 1427 | ||
1428 | if (zilog_irq == -1) | 1428 | if (!zilog_irq) |
1429 | zilog_irq = op->archdata.irqs[0]; | 1429 | zilog_irq = op->archdata.irqs[0]; |
1430 | 1430 | ||
1431 | up = &sunzilog_port_table[inst * 2]; | 1431 | up = &sunzilog_port_table[inst * 2]; |
@@ -1580,7 +1580,7 @@ static int __init sunzilog_init(void) | |||
1580 | if (err) | 1580 | if (err) |
1581 | goto out_unregister_uart; | 1581 | goto out_unregister_uart; |
1582 | 1582 | ||
1583 | if (zilog_irq != -1) { | 1583 | if (!zilog_irq) { |
1584 | struct uart_sunzilog_port *up = sunzilog_irq_chain; | 1584 | struct uart_sunzilog_port *up = sunzilog_irq_chain; |
1585 | err = request_irq(zilog_irq, sunzilog_interrupt, IRQF_SHARED, | 1585 | err = request_irq(zilog_irq, sunzilog_interrupt, IRQF_SHARED, |
1586 | "zs", sunzilog_irq_chain); | 1586 | "zs", sunzilog_irq_chain); |
@@ -1621,7 +1621,7 @@ static void __exit sunzilog_exit(void) | |||
1621 | { | 1621 | { |
1622 | platform_driver_unregister(&zs_driver); | 1622 | platform_driver_unregister(&zs_driver); |
1623 | 1623 | ||
1624 | if (zilog_irq != -1) { | 1624 | if (!zilog_irq) { |
1625 | struct uart_sunzilog_port *up = sunzilog_irq_chain; | 1625 | struct uart_sunzilog_port *up = sunzilog_irq_chain; |
1626 | 1626 | ||
1627 | /* Disable Interrupts */ | 1627 | /* Disable Interrupts */ |
@@ -1637,7 +1637,7 @@ static void __exit sunzilog_exit(void) | |||
1637 | } | 1637 | } |
1638 | 1638 | ||
1639 | free_irq(zilog_irq, sunzilog_irq_chain); | 1639 | free_irq(zilog_irq, sunzilog_irq_chain); |
1640 | zilog_irq = -1; | 1640 | zilog_irq = 0; |
1641 | } | 1641 | } |
1642 | 1642 | ||
1643 | if (sunzilog_reg.nr) { | 1643 | if (sunzilog_reg.nr) { |
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 2ebe606a2db1..f99b0c965f85 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c | |||
@@ -1360,7 +1360,7 @@ static int ucc_uart_probe(struct platform_device *ofdev) | |||
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | qe_port->port.irq = irq_of_parse_and_map(np, 0); | 1362 | qe_port->port.irq = irq_of_parse_and_map(np, 0); |
1363 | if (qe_port->port.irq == NO_IRQ) { | 1363 | if (qe_port->port.irq == 0) { |
1364 | dev_err(&ofdev->dev, "could not map IRQ for UCC%u\n", | 1364 | dev_err(&ofdev->dev, "could not map IRQ for UCC%u\n", |
1365 | qe_port->ucc_num + 1); | 1365 | qe_port->ucc_num + 1); |
1366 | ret = -EINVAL; | 1366 | ret = -EINVAL; |
diff --git a/drivers/tty/serial/vr41xx_siu.c b/drivers/tty/serial/vr41xx_siu.c index 83148e79ca13..cf0d9485ec08 100644 --- a/drivers/tty/serial/vr41xx_siu.c +++ b/drivers/tty/serial/vr41xx_siu.c | |||
@@ -61,7 +61,7 @@ | |||
61 | static struct uart_port siu_uart_ports[SIU_PORTS_MAX] = { | 61 | static struct uart_port siu_uart_ports[SIU_PORTS_MAX] = { |
62 | [0 ... SIU_PORTS_MAX-1] = { | 62 | [0 ... SIU_PORTS_MAX-1] = { |
63 | .lock = __SPIN_LOCK_UNLOCKED(siu_uart_ports->lock), | 63 | .lock = __SPIN_LOCK_UNLOCKED(siu_uart_ports->lock), |
64 | .irq = -1, | 64 | .irq = 0, |
65 | }, | 65 | }, |
66 | }; | 66 | }; |
67 | 67 | ||
@@ -171,7 +171,7 @@ static inline unsigned int siu_check_type(struct uart_port *port) | |||
171 | { | 171 | { |
172 | if (port->line == 0) | 172 | if (port->line == 0) |
173 | return PORT_VR41XX_SIU; | 173 | return PORT_VR41XX_SIU; |
174 | if (port->line == 1 && port->irq != -1) | 174 | if (port->line == 1 && port->irq) |
175 | return PORT_VR41XX_DSIU; | 175 | return PORT_VR41XX_DSIU; |
176 | 176 | ||
177 | return PORT_UNKNOWN; | 177 | return PORT_UNKNOWN; |