diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:15 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:59 -0400 |
commit | 07f9479a40cc778bc1462ada11f95b01360ae4ff (patch) | |
tree | 0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /drivers/tty | |
parent | 9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff) | |
parent | cd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff) |
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
Diffstat (limited to 'drivers/tty')
41 files changed, 121 insertions, 123 deletions
diff --git a/drivers/tty/bfin_jtag_comm.c b/drivers/tty/bfin_jtag_comm.c index 16402445f2b..03c285bb2f1 100644 --- a/drivers/tty/bfin_jtag_comm.c +++ b/drivers/tty/bfin_jtag_comm.c | |||
@@ -251,11 +251,11 @@ static int __init bfin_jc_init(void) | |||
251 | bfin_jc_write_buf.head = bfin_jc_write_buf.tail = 0; | 251 | bfin_jc_write_buf.head = bfin_jc_write_buf.tail = 0; |
252 | bfin_jc_write_buf.buf = kmalloc(CIRC_SIZE, GFP_KERNEL); | 252 | bfin_jc_write_buf.buf = kmalloc(CIRC_SIZE, GFP_KERNEL); |
253 | if (!bfin_jc_write_buf.buf) | 253 | if (!bfin_jc_write_buf.buf) |
254 | goto err; | 254 | goto err_buf; |
255 | 255 | ||
256 | bfin_jc_driver = alloc_tty_driver(1); | 256 | bfin_jc_driver = alloc_tty_driver(1); |
257 | if (!bfin_jc_driver) | 257 | if (!bfin_jc_driver) |
258 | goto err; | 258 | goto err_driver; |
259 | 259 | ||
260 | bfin_jc_driver->owner = THIS_MODULE; | 260 | bfin_jc_driver->owner = THIS_MODULE; |
261 | bfin_jc_driver->driver_name = DRV_NAME; | 261 | bfin_jc_driver->driver_name = DRV_NAME; |
@@ -275,7 +275,9 @@ static int __init bfin_jc_init(void) | |||
275 | 275 | ||
276 | err: | 276 | err: |
277 | put_tty_driver(bfin_jc_driver); | 277 | put_tty_driver(bfin_jc_driver); |
278 | err_driver: | ||
278 | kfree(bfin_jc_write_buf.buf); | 279 | kfree(bfin_jc_write_buf.buf); |
280 | err_buf: | ||
279 | kthread_stop(bfin_jc_kthread); | 281 | kthread_stop(bfin_jc_kthread); |
280 | return ret; | 282 | return ret; |
281 | } | 283 | } |
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c index c3425bb3a1f..b6f7d52f7c3 100644 --- a/drivers/tty/hvc/hvc_iucv.c +++ b/drivers/tty/hvc/hvc_iucv.c | |||
@@ -255,7 +255,7 @@ static int hvc_iucv_write(struct hvc_iucv_private *priv, | |||
255 | default: | 255 | default: |
256 | written = -EIO; | 256 | written = -EIO; |
257 | } | 257 | } |
258 | /* remove buffer if an error has occured or received data | 258 | /* remove buffer if an error has occurred or received data |
259 | * is not correct */ | 259 | * is not correct */ |
260 | if (rc || (rb->mbuf->version != MSG_VERSION) || | 260 | if (rc || (rb->mbuf->version != MSG_VERSION) || |
261 | (rb->msg.length != MSG_SIZE(rb->mbuf->datalen))) | 261 | (rb->msg.length != MSG_SIZE(rb->mbuf->datalen))) |
@@ -620,7 +620,7 @@ static void hvc_iucv_hangup(struct hvc_iucv_private *priv) | |||
620 | * the index of an struct hvc_iucv_private instance. | 620 | * the index of an struct hvc_iucv_private instance. |
621 | * | 621 | * |
622 | * This routine notifies the HVC back-end that a tty hangup (carrier loss, | 622 | * This routine notifies the HVC back-end that a tty hangup (carrier loss, |
623 | * virtual or otherwise) has occured. | 623 | * virtual or otherwise) has occurred. |
624 | * The z/VM IUCV HVC device driver ignores virtual hangups (vhangup()) | 624 | * The z/VM IUCV HVC device driver ignores virtual hangups (vhangup()) |
625 | * to keep an existing IUCV communication path established. | 625 | * to keep an existing IUCV communication path established. |
626 | * (Background: vhangup() is called from user space (by getty or login) to | 626 | * (Background: vhangup() is called from user space (by getty or login) to |
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c index 5e2f52b3332..e6eea148524 100644 --- a/drivers/tty/hvc/hvc_vio.c +++ b/drivers/tty/hvc/hvc_vio.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * vio driver interface to hvc_console.c | 2 | * vio driver interface to hvc_console.c |
3 | * | 3 | * |
4 | * This code was moved here to allow the remaing code to be reused as a | 4 | * This code was moved here to allow the remaining code to be reused as a |
5 | * generic polling mode with semi-reliable transport driver core to the | 5 | * generic polling mode with semi-reliable transport driver core to the |
6 | * console and tty subsystems. | 6 | * console and tty subsystems. |
7 | * | 7 | * |
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index c35f1a73bc8..52fdf60bdbe 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c | |||
@@ -178,7 +178,7 @@ static int __init xen_hvc_init(void) | |||
178 | if (xencons_irq < 0) | 178 | if (xencons_irq < 0) |
179 | xencons_irq = 0; /* NO_IRQ */ | 179 | xencons_irq = 0; /* NO_IRQ */ |
180 | else | 180 | else |
181 | set_irq_noprobe(xencons_irq); | 181 | irq_set_noprobe(xencons_irq); |
182 | 182 | ||
183 | hp = hvc_alloc(HVC_COOKIE, xencons_irq, ops, 256); | 183 | hp = hvc_alloc(HVC_COOKIE, xencons_irq, ops, 256); |
184 | if (IS_ERR(hp)) | 184 | if (IS_ERR(hp)) |
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index bef238f9ffd..4c8b6654693 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
@@ -118,7 +118,7 @@ | |||
118 | * arch/powerepc/include/asm/hvcserver.h | 118 | * arch/powerepc/include/asm/hvcserver.h |
119 | * | 119 | * |
120 | * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to | 120 | * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to |
121 | * prevent possible lockup with realtime scheduling as similarily pointed out by | 121 | * prevent possible lockup with realtime scheduling as similarly pointed out by |
122 | * akpm in hvc_console. Changed resulted in the removal of hvcs_final_close() | 122 | * akpm in hvc_console. Changed resulted in the removal of hvcs_final_close() |
123 | * to reorder cleanup operations and prevent discarding of pending data during | 123 | * to reorder cleanup operations and prevent discarding of pending data during |
124 | * an hvcs_close(). Removed spinlock protection of hvcs_struct data members in | 124 | * an hvcs_close(). Removed spinlock protection of hvcs_struct data members in |
@@ -581,7 +581,7 @@ static void hvcs_try_write(struct hvcs_struct *hvcsd) | |||
581 | /* | 581 | /* |
582 | * We are still obligated to deliver the data to the | 582 | * We are still obligated to deliver the data to the |
583 | * hypervisor even if the tty has been closed because | 583 | * hypervisor even if the tty has been closed because |
584 | * we commited to delivering it. But don't try to wake | 584 | * we committed to delivering it. But don't try to wake |
585 | * a non-existent tty. | 585 | * a non-existent tty. |
586 | */ | 586 | */ |
587 | if (tty) { | 587 | if (tty) { |
@@ -1349,7 +1349,7 @@ static int hvcs_write(struct tty_struct *tty, | |||
1349 | spin_lock_irqsave(&hvcsd->lock, flags); | 1349 | spin_lock_irqsave(&hvcsd->lock, flags); |
1350 | 1350 | ||
1351 | /* | 1351 | /* |
1352 | * Somehow an open succedded but the device was removed or the | 1352 | * Somehow an open succeeded but the device was removed or the |
1353 | * connection terminated between the vty-server and partner vty during | 1353 | * connection terminated between the vty-server and partner vty during |
1354 | * the middle of a write operation? This is a crummy place to do this | 1354 | * the middle of a write operation? This is a crummy place to do this |
1355 | * but we want to keep it all in the spinlock. | 1355 | * but we want to keep it all in the spinlock. |
@@ -1420,7 +1420,7 @@ static int hvcs_write(struct tty_struct *tty, | |||
1420 | } | 1420 | } |
1421 | 1421 | ||
1422 | /* | 1422 | /* |
1423 | * This is really asking how much can we guarentee that we can send or that we | 1423 | * This is really asking how much can we guarantee that we can send or that we |
1424 | * absolutely WILL BUFFER if we can't send it. This driver MUST honor the | 1424 | * absolutely WILL BUFFER if we can't send it. This driver MUST honor the |
1425 | * return value, hence the reason for hvcs_struct buffering. | 1425 | * return value, hence the reason for hvcs_struct buffering. |
1426 | */ | 1426 | */ |
diff --git a/drivers/tty/mxser.h b/drivers/tty/mxser.h index 41878a69203..0bf794313ff 100644 --- a/drivers/tty/mxser.h +++ b/drivers/tty/mxser.h | |||
@@ -113,7 +113,7 @@ | |||
113 | #define MOXA_MUST_IIR_RTO 0x0C | 113 | #define MOXA_MUST_IIR_RTO 0x0C |
114 | #define MOXA_MUST_IIR_LSR 0x06 | 114 | #define MOXA_MUST_IIR_LSR 0x06 |
115 | 115 | ||
116 | /* recieved Xon/Xoff or specical interrupt pending */ | 116 | /* received Xon/Xoff or specical interrupt pending */ |
117 | #define MOXA_MUST_IIR_XSC 0x10 | 117 | #define MOXA_MUST_IIR_XSC 0x10 |
118 | 118 | ||
119 | /* RTS/CTS change state interrupt pending */ | 119 | /* RTS/CTS change state interrupt pending */ |
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 176f63256b3..74273e638c0 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -74,7 +74,7 @@ module_param(debug, int, 0600); | |||
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * Semi-arbitary buffer size limits. 0710 is normally run with 32-64 byte | 77 | * Semi-arbitrary buffer size limits. 0710 is normally run with 32-64 byte |
78 | * limits so this is plenty | 78 | * limits so this is plenty |
79 | */ | 79 | */ |
80 | #define MAX_MRU 512 | 80 | #define MAX_MRU 512 |
@@ -82,7 +82,7 @@ module_param(debug, int, 0600); | |||
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Each block of data we have queued to go out is in the form of | 84 | * Each block of data we have queued to go out is in the form of |
85 | * a gsm_msg which holds everything we need in a link layer independant | 85 | * a gsm_msg which holds everything we need in a link layer independent |
86 | * format | 86 | * format |
87 | */ | 87 | */ |
88 | 88 | ||
@@ -1193,8 +1193,8 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command, | |||
1193 | break; | 1193 | break; |
1194 | /* Optional unsupported commands */ | 1194 | /* Optional unsupported commands */ |
1195 | case CMD_PN: /* Parameter negotiation */ | 1195 | case CMD_PN: /* Parameter negotiation */ |
1196 | case CMD_RPN: /* Remote port negotation */ | 1196 | case CMD_RPN: /* Remote port negotiation */ |
1197 | case CMD_SNC: /* Service negotation command */ | 1197 | case CMD_SNC: /* Service negotiation command */ |
1198 | default: | 1198 | default: |
1199 | /* Reply to bad commands with an NSC */ | 1199 | /* Reply to bad commands with an NSC */ |
1200 | buf[0] = command; | 1200 | buf[0] = command; |
@@ -1658,8 +1658,12 @@ static void gsm_queue(struct gsm_mux *gsm) | |||
1658 | 1658 | ||
1659 | if ((gsm->control & ~PF) == UI) | 1659 | if ((gsm->control & ~PF) == UI) |
1660 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); | 1660 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); |
1661 | /* generate final CRC with received FCS */ | 1661 | if (gsm->encoding == 0){ |
1662 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); | 1662 | /* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only. |
1663 | In this case it contain the last piece of data | ||
1664 | required to generate final CRC */ | ||
1665 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); | ||
1666 | } | ||
1663 | if (gsm->fcs != GOOD_FCS) { | 1667 | if (gsm->fcs != GOOD_FCS) { |
1664 | gsm->bad_fcs++; | 1668 | gsm->bad_fcs++; |
1665 | if (debug & 4) | 1669 | if (debug & 4) |
@@ -2026,7 +2030,7 @@ EXPORT_SYMBOL_GPL(gsm_activate_mux); | |||
2026 | * @mux: mux to free | 2030 | * @mux: mux to free |
2027 | * | 2031 | * |
2028 | * Dispose of allocated resources for a dead mux. No refcounting | 2032 | * Dispose of allocated resources for a dead mux. No refcounting |
2029 | * at present so the mux must be truely dead. | 2033 | * at present so the mux must be truly dead. |
2030 | */ | 2034 | */ |
2031 | void gsm_free_mux(struct gsm_mux *gsm) | 2035 | void gsm_free_mux(struct gsm_mux *gsm) |
2032 | { | 2036 | { |
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 428f4fe0b5f..0ad32888091 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -95,6 +95,7 @@ static void n_tty_set_room(struct tty_struct *tty) | |||
95 | { | 95 | { |
96 | /* tty->read_cnt is not read locked ? */ | 96 | /* tty->read_cnt is not read locked ? */ |
97 | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; | 97 | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; |
98 | int old_left; | ||
98 | 99 | ||
99 | /* | 100 | /* |
100 | * If we are doing input canonicalization, and there are no | 101 | * If we are doing input canonicalization, and there are no |
@@ -104,7 +105,12 @@ static void n_tty_set_room(struct tty_struct *tty) | |||
104 | */ | 105 | */ |
105 | if (left <= 0) | 106 | if (left <= 0) |
106 | left = tty->icanon && !tty->canon_data; | 107 | left = tty->icanon && !tty->canon_data; |
108 | old_left = tty->receive_room; | ||
107 | tty->receive_room = left; | 109 | tty->receive_room = left; |
110 | |||
111 | /* Did this open up the receive buffer? We may need to flip */ | ||
112 | if (left && !old_left) | ||
113 | schedule_work(&tty->buf.work); | ||
108 | } | 114 | } |
109 | 115 | ||
110 | static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty) | 116 | static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty) |
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index f4f11164efe..fd0a98524d5 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c | |||
@@ -1673,7 +1673,7 @@ static void ntty_hangup(struct tty_struct *tty) | |||
1673 | 1673 | ||
1674 | /* | 1674 | /* |
1675 | * called when the userspace process writes to the tty (/dev/noz*). | 1675 | * called when the userspace process writes to the tty (/dev/noz*). |
1676 | * Data is inserted into a fifo, which is then read and transfered to the modem. | 1676 | * Data is inserted into a fifo, which is then read and transferred to the modem. |
1677 | */ | 1677 | */ |
1678 | static int ntty_write(struct tty_struct *tty, const unsigned char *buffer, | 1678 | static int ntty_write(struct tty_struct *tty, const unsigned char *buffer, |
1679 | int count) | 1679 | int count) |
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index 3780da8ad12..036feeb5e3f 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c | |||
@@ -2060,7 +2060,7 @@ static __init int register_PCI(int i, struct pci_dev *dev) | |||
2060 | sClockPrescale = 0x19; | 2060 | sClockPrescale = 0x19; |
2061 | rp_baud_base[i] = 230400; | 2061 | rp_baud_base[i] = 230400; |
2062 | } else { | 2062 | } else { |
2063 | /* mod 4 (devide by 5) prescale */ | 2063 | /* mod 4 (divide by 5) prescale */ |
2064 | sClockPrescale = 0x14; | 2064 | sClockPrescale = 0x14; |
2065 | rp_baud_base[i] = 460800; | 2065 | rp_baud_base[i] = 460800; |
2066 | } | 2066 | } |
@@ -2183,7 +2183,7 @@ static int __init init_ISA(int i) | |||
2183 | sClockPrescale = 0x19; /* mod 9 (divide by 10) prescale */ | 2183 | sClockPrescale = 0x19; /* mod 9 (divide by 10) prescale */ |
2184 | rp_baud_base[i] = 230400; | 2184 | rp_baud_base[i] = 230400; |
2185 | } else { | 2185 | } else { |
2186 | sClockPrescale = 0x14; /* mod 4 (devide by 5) prescale */ | 2186 | sClockPrescale = 0x14; /* mod 4 (divide by 5) prescale */ |
2187 | rp_baud_base[i] = 460800; | 2187 | rp_baud_base[i] = 460800; |
2188 | } | 2188 | } |
2189 | 2189 | ||
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index b3b881bc471..6611535f444 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
@@ -1629,7 +1629,7 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id) | |||
1629 | up->port.iotype == UPIO_DWAPB32) && | 1629 | up->port.iotype == UPIO_DWAPB32) && |
1630 | (iir & UART_IIR_BUSY) == UART_IIR_BUSY) { | 1630 | (iir & UART_IIR_BUSY) == UART_IIR_BUSY) { |
1631 | /* The DesignWare APB UART has an Busy Detect (0x07) | 1631 | /* The DesignWare APB UART has an Busy Detect (0x07) |
1632 | * interrupt meaning an LCR write attempt occured while the | 1632 | * interrupt meaning an LCR write attempt occurred while the |
1633 | * UART was busy. The interrupt must be cleared by reading | 1633 | * UART was busy. The interrupt must be cleared by reading |
1634 | * the UART status register (USR) and the LCR re-written. */ | 1634 | * the UART status register (USR) and the LCR re-written. */ |
1635 | unsigned int status; | 1635 | unsigned int status; |
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c index 8b8930f700b..738cec9807d 100644 --- a/drivers/tty/serial/8250_pci.c +++ b/drivers/tty/serial/8250_pci.c | |||
@@ -433,7 +433,7 @@ static void __devexit sbs_exit(struct pci_dev *dev) | |||
433 | /* | 433 | /* |
434 | * SIIG serial cards have an PCI interface chip which also controls | 434 | * SIIG serial cards have an PCI interface chip which also controls |
435 | * the UART clocking frequency. Each UART can be clocked independently | 435 | * the UART clocking frequency. Each UART can be clocked independently |
436 | * (except cards equiped with 4 UARTs) and initial clocking settings | 436 | * (except cards equipped with 4 UARTs) and initial clocking settings |
437 | * are stored in the EEPROM chip. It can cause problems because this | 437 | * are stored in the EEPROM chip. It can cause problems because this |
438 | * version of serial driver doesn't support differently clocked UART's | 438 | * version of serial driver doesn't support differently clocked UART's |
439 | * on single PCI card. To prevent this, initialization functions set | 439 | * on single PCI card. To prevent this, initialization functions set |
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index e1aee37270f..80484af781e 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig | |||
@@ -1506,7 +1506,7 @@ config SERIAL_BCM63XX_CONSOLE | |||
1506 | 1506 | ||
1507 | config SERIAL_GRLIB_GAISLER_APBUART | 1507 | config SERIAL_GRLIB_GAISLER_APBUART |
1508 | tristate "GRLIB APBUART serial support" | 1508 | tristate "GRLIB APBUART serial support" |
1509 | depends on OF | 1509 | depends on OF && SPARC |
1510 | select SERIAL_CORE | 1510 | select SERIAL_CORE |
1511 | ---help--- | 1511 | ---help--- |
1512 | Add support for the GRLIB APBUART serial port. | 1512 | Add support for the GRLIB APBUART serial port. |
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 57731e87008..6deee4e546b 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
@@ -520,7 +520,7 @@ static bool pl011_dma_tx_irq(struct uart_amba_port *uap) | |||
520 | 520 | ||
521 | /* | 521 | /* |
522 | * We don't have a TX buffer queued, so try to queue one. | 522 | * We don't have a TX buffer queued, so try to queue one. |
523 | * If we succesfully queued a buffer, mask the TX IRQ. | 523 | * If we successfully queued a buffer, mask the TX IRQ. |
524 | */ | 524 | */ |
525 | if (pl011_dma_tx_refill(uap) > 0) { | 525 | if (pl011_dma_tx_refill(uap) > 0) { |
526 | uap->im &= ~UART011_TXIM; | 526 | uap->im &= ~UART011_TXIM; |
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index 1ab999b04ef..19a943693e4 100644 --- a/drivers/tty/serial/apbuart.c +++ b/drivers/tty/serial/apbuart.c | |||
@@ -555,10 +555,9 @@ static struct uart_driver grlib_apbuart_driver = { | |||
555 | 555 | ||
556 | static int __devinit apbuart_probe(struct platform_device *op) | 556 | static int __devinit apbuart_probe(struct platform_device *op) |
557 | { | 557 | { |
558 | int i = -1; | 558 | int i; |
559 | struct uart_port *port = NULL; | 559 | struct uart_port *port = NULL; |
560 | 560 | ||
561 | i = 0; | ||
562 | for (i = 0; i < grlib_apbuart_port_nr; i++) { | 561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { |
563 | if (op->dev.of_node == grlib_apbuart_nodes[i]) | 562 | if (op->dev.of_node == grlib_apbuart_nodes[i]) |
564 | break; | 563 | break; |
@@ -566,6 +565,7 @@ static int __devinit apbuart_probe(struct platform_device *op) | |||
566 | 565 | ||
567 | port = &grlib_apbuart_ports[i]; | 566 | port = &grlib_apbuart_ports[i]; |
568 | port->dev = &op->dev; | 567 | port->dev = &op->dev; |
568 | port->irq = op->archdata.irqs[0]; | ||
569 | 569 | ||
570 | uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); | 570 | uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); |
571 | 571 | ||
@@ -598,24 +598,12 @@ static struct platform_driver grlib_apbuart_of_driver = { | |||
598 | 598 | ||
599 | static int grlib_apbuart_configure(void) | 599 | static int grlib_apbuart_configure(void) |
600 | { | 600 | { |
601 | struct device_node *np, *rp; | 601 | struct device_node *np; |
602 | const u32 *prop; | 602 | int line = 0; |
603 | int freq_khz, line = 0; | ||
604 | |||
605 | /* Get bus frequency */ | ||
606 | rp = of_find_node_by_path("/"); | ||
607 | if (!rp) | ||
608 | return -ENODEV; | ||
609 | rp = of_get_next_child(rp, NULL); | ||
610 | if (!rp) | ||
611 | return -ENODEV; | ||
612 | prop = of_get_property(rp, "clock-frequency", NULL); | ||
613 | if (!prop) | ||
614 | return -ENODEV; | ||
615 | freq_khz = *prop; | ||
616 | 603 | ||
617 | for_each_matching_node(np, apbuart_match) { | 604 | for_each_matching_node(np, apbuart_match) { |
618 | const int *irqs, *ampopts; | 605 | const int *ampopts; |
606 | const u32 *freq_hz; | ||
619 | const struct amba_prom_registers *regs; | 607 | const struct amba_prom_registers *regs; |
620 | struct uart_port *port; | 608 | struct uart_port *port; |
621 | unsigned long addr; | 609 | unsigned long addr; |
@@ -623,11 +611,11 @@ static int grlib_apbuart_configure(void) | |||
623 | ampopts = of_get_property(np, "ampopts", NULL); | 611 | ampopts = of_get_property(np, "ampopts", NULL); |
624 | if (ampopts && (*ampopts == 0)) | 612 | if (ampopts && (*ampopts == 0)) |
625 | continue; /* Ignore if used by another OS instance */ | 613 | continue; /* Ignore if used by another OS instance */ |
626 | |||
627 | irqs = of_get_property(np, "interrupts", NULL); | ||
628 | regs = of_get_property(np, "reg", NULL); | 614 | regs = of_get_property(np, "reg", NULL); |
615 | /* Frequency of APB Bus is frequency of UART */ | ||
616 | freq_hz = of_get_property(np, "freq", NULL); | ||
629 | 617 | ||
630 | if (!irqs || !regs) | 618 | if (!regs || !freq_hz || (*freq_hz == 0)) |
631 | continue; | 619 | continue; |
632 | 620 | ||
633 | grlib_apbuart_nodes[line] = np; | 621 | grlib_apbuart_nodes[line] = np; |
@@ -638,12 +626,12 @@ static int grlib_apbuart_configure(void) | |||
638 | 626 | ||
639 | port->mapbase = addr; | 627 | port->mapbase = addr; |
640 | port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); | 628 | port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); |
641 | port->irq = *irqs; | 629 | port->irq = 0; |
642 | port->iotype = UPIO_MEM; | 630 | port->iotype = UPIO_MEM; |
643 | port->ops = &grlib_apbuart_ops; | 631 | port->ops = &grlib_apbuart_ops; |
644 | port->flags = UPF_BOOT_AUTOCONF; | 632 | port->flags = UPF_BOOT_AUTOCONF; |
645 | port->line = line; | 633 | port->line = line; |
646 | port->uartclk = freq_khz * 1000; | 634 | port->uartclk = *freq_hz; |
647 | port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); | 635 | port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); |
648 | line++; | 636 | line++; |
649 | 637 | ||
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c index 53a46822705..8a869e58f6d 100644 --- a/drivers/tty/serial/icom.c +++ b/drivers/tty/serial/icom.c | |||
@@ -1248,7 +1248,7 @@ static void icom_set_termios(struct uart_port *port, | |||
1248 | } | 1248 | } |
1249 | } | 1249 | } |
1250 | 1250 | ||
1251 | /* Enable Transmitter and Reciever */ | 1251 | /* Enable Transmitter and Receiver */ |
1252 | offset = | 1252 | offset = |
1253 | (unsigned long) &ICOM_PORT->statStg->rcv[0] - | 1253 | (unsigned long) &ICOM_PORT->statStg->rcv[0] - |
1254 | (unsigned long) ICOM_PORT->statStg; | 1254 | (unsigned long) ICOM_PORT->statStg; |
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index dfcf4b1878a..62df72d9f0a 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -78,7 +78,7 @@ | |||
78 | #define URXD_FRMERR (1<<12) | 78 | #define URXD_FRMERR (1<<12) |
79 | #define URXD_BRK (1<<11) | 79 | #define URXD_BRK (1<<11) |
80 | #define URXD_PRERR (1<<10) | 80 | #define URXD_PRERR (1<<10) |
81 | #define UCR1_ADEN (1<<15) /* Auto dectect interrupt */ | 81 | #define UCR1_ADEN (1<<15) /* Auto detect interrupt */ |
82 | #define UCR1_ADBR (1<<14) /* Auto detect baud rate */ | 82 | #define UCR1_ADBR (1<<14) /* Auto detect baud rate */ |
83 | #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ | 83 | #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ |
84 | #define UCR1_IDEN (1<<12) /* Idle condition interrupt */ | 84 | #define UCR1_IDEN (1<<12) /* Idle condition interrupt */ |
@@ -382,12 +382,13 @@ static void imx_start_tx(struct uart_port *port) | |||
382 | static irqreturn_t imx_rtsint(int irq, void *dev_id) | 382 | static irqreturn_t imx_rtsint(int irq, void *dev_id) |
383 | { | 383 | { |
384 | struct imx_port *sport = dev_id; | 384 | struct imx_port *sport = dev_id; |
385 | unsigned int val = readl(sport->port.membase + USR1) & USR1_RTSS; | 385 | unsigned int val; |
386 | unsigned long flags; | 386 | unsigned long flags; |
387 | 387 | ||
388 | spin_lock_irqsave(&sport->port.lock, flags); | 388 | spin_lock_irqsave(&sport->port.lock, flags); |
389 | 389 | ||
390 | writel(USR1_RTSD, sport->port.membase + USR1); | 390 | writel(USR1_RTSD, sport->port.membase + USR1); |
391 | val = readl(sport->port.membase + USR1) & USR1_RTSS; | ||
391 | uart_handle_cts_change(&sport->port, !!val); | 392 | uart_handle_cts_change(&sport->port, !!val); |
392 | wake_up_interruptible(&sport->port.state->port.delta_msr_wait); | 393 | wake_up_interruptible(&sport->port.state->port.delta_msr_wait); |
393 | 394 | ||
diff --git a/drivers/tty/serial/ip22zilog.c b/drivers/tty/serial/ip22zilog.c index ebff4a1d4bc..7b1cda59ebb 100644 --- a/drivers/tty/serial/ip22zilog.c +++ b/drivers/tty/serial/ip22zilog.c | |||
@@ -375,7 +375,7 @@ static void ip22zilog_transmit_chars(struct uart_ip22zilog_port *up, | |||
375 | * be nice to transmit console writes just like we normally would for | 375 | * be nice to transmit console writes just like we normally would for |
376 | * a TTY line. (ie. buffered and TX interrupt driven). That is not | 376 | * a TTY line. (ie. buffered and TX interrupt driven). That is not |
377 | * easy because console writes cannot sleep. One solution might be | 377 | * easy because console writes cannot sleep. One solution might be |
378 | * to poll on enough port->xmit space becomming free. -DaveM | 378 | * to poll on enough port->xmit space becoming free. -DaveM |
379 | */ | 379 | */ |
380 | if (!(status & Tx_BUF_EMP)) | 380 | if (!(status & Tx_BUF_EMP)) |
381 | return; | 381 | return; |
diff --git a/drivers/tty/serial/jsm/jsm.h b/drivers/tty/serial/jsm/jsm.h index 38a509c684c..b704c8ce0d7 100644 --- a/drivers/tty/serial/jsm/jsm.h +++ b/drivers/tty/serial/jsm/jsm.h | |||
@@ -273,7 +273,7 @@ struct neo_uart_struct { | |||
273 | u8 fctr; /* WR FCTR - Feature Control Reg */ | 273 | u8 fctr; /* WR FCTR - Feature Control Reg */ |
274 | u8 efr; /* WR EFR - Enhanced Function Reg */ | 274 | u8 efr; /* WR EFR - Enhanced Function Reg */ |
275 | u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ | 275 | u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ |
276 | u8 rfifo; /* WR RXCNT/RXTRG - Recieve FIFO Reg */ | 276 | u8 rfifo; /* WR RXCNT/RXTRG - Receive FIFO Reg */ |
277 | u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ | 277 | u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ |
278 | u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ | 278 | u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ |
279 | u8 xonchar1; /* WR XON 1 - Xon Character 1 Reg */ | 279 | u8 xonchar1; /* WR XON 1 - Xon Character 1 Reg */ |
diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c index 7960d9633c1..4538c3e3646 100644 --- a/drivers/tty/serial/jsm/jsm_neo.c +++ b/drivers/tty/serial/jsm/jsm_neo.c | |||
@@ -381,7 +381,7 @@ static void neo_copy_data_from_uart_to_queue(struct jsm_channel *ch) | |||
381 | /* Copy data from uart to the queue */ | 381 | /* Copy data from uart to the queue */ |
382 | memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, n); | 382 | memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, n); |
383 | /* | 383 | /* |
384 | * Since RX_FIFO_DATA_ERROR was 0, we are guarenteed | 384 | * Since RX_FIFO_DATA_ERROR was 0, we are guaranteed |
385 | * that all the data currently in the FIFO is free of | 385 | * that all the data currently in the FIFO is free of |
386 | * breaks and parity/frame/orun errors. | 386 | * breaks and parity/frame/orun errors. |
387 | */ | 387 | */ |
@@ -1210,7 +1210,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) | |||
1210 | * Why would I check EVERY possibility of type of | 1210 | * Why would I check EVERY possibility of type of |
1211 | * interrupt, when we know its TXRDY??? | 1211 | * interrupt, when we know its TXRDY??? |
1212 | * Becuz for some reason, even tho we got triggered for TXRDY, | 1212 | * Becuz for some reason, even tho we got triggered for TXRDY, |
1213 | * it seems to be occassionally wrong. Instead of TX, which | 1213 | * it seems to be occasionally wrong. Instead of TX, which |
1214 | * it should be, I was getting things like RXDY too. Weird. | 1214 | * it should be, I was getting things like RXDY too. Weird. |
1215 | */ | 1215 | */ |
1216 | neo_parse_isr(brd, port); | 1216 | neo_parse_isr(brd, port); |
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c index 25a8bc565f4..87e7e6c876d 100644 --- a/drivers/tty/serial/kgdboc.c +++ b/drivers/tty/serial/kgdboc.c | |||
@@ -131,7 +131,7 @@ static void kgdboc_unregister_kbd(void) | |||
131 | 131 | ||
132 | static int kgdboc_option_setup(char *opt) | 132 | static int kgdboc_option_setup(char *opt) |
133 | { | 133 | { |
134 | if (strlen(opt) > MAX_CONFIG_LEN) { | 134 | if (strlen(opt) >= MAX_CONFIG_LEN) { |
135 | printk(KERN_ERR "kgdboc: config string too long\n"); | 135 | printk(KERN_ERR "kgdboc: config string too long\n"); |
136 | return -ENOSPC; | 136 | return -ENOSPC; |
137 | } | 137 | } |
diff --git a/drivers/tty/serial/max3107.h b/drivers/tty/serial/max3107.h index 7ab63239250..8415fc723b9 100644 --- a/drivers/tty/serial/max3107.h +++ b/drivers/tty/serial/max3107.h | |||
@@ -369,7 +369,7 @@ struct max3107_port { | |||
369 | struct spi_device *spi; | 369 | struct spi_device *spi; |
370 | 370 | ||
371 | #if defined(CONFIG_GPIOLIB) | 371 | #if defined(CONFIG_GPIOLIB) |
372 | /* GPIO chip stucture */ | 372 | /* GPIO chip structure */ |
373 | struct gpio_chip chip; | 373 | struct gpio_chip chip; |
374 | #endif | 374 | #endif |
375 | 375 | ||
diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c index 8890612a8d9..1bd28450ca4 100644 --- a/drivers/tty/serial/mrst_max3110.c +++ b/drivers/tty/serial/mrst_max3110.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * 1 word. If SPI master controller doesn't support sclk frequency change, | 23 | * 1 word. If SPI master controller doesn't support sclk frequency change, |
24 | * then the char need be sent out one by one with some delay | 24 | * then the char need be sent out one by one with some delay |
25 | * | 25 | * |
26 | * 2. Currently only RX availabe interrrupt is used, no need for waiting TXE | 26 | * 2. Currently only RX available interrrupt is used, no need for waiting TXE |
27 | * interrupt for a low speed UART device | 27 | * interrupt for a low speed UART device |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/tty/serial/mrst_max3110.h b/drivers/tty/serial/mrst_max3110.h index d1ef43af397..c37ea48c825 100644 --- a/drivers/tty/serial/mrst_max3110.h +++ b/drivers/tty/serial/mrst_max3110.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #define WC_IRQ_MASK (0xF << 8) | 22 | #define WC_IRQ_MASK (0xF << 8) |
23 | #define WC_TXE_IRQ_ENABLE (1 << 11) /* TX empty irq */ | 23 | #define WC_TXE_IRQ_ENABLE (1 << 11) /* TX empty irq */ |
24 | #define WC_RXA_IRQ_ENABLE (1 << 10) /* RX availabe irq */ | 24 | #define WC_RXA_IRQ_ENABLE (1 << 10) /* RX available irq */ |
25 | #define WC_PAR_HIGH_IRQ_ENABLE (1 << 9) | 25 | #define WC_PAR_HIGH_IRQ_ENABLE (1 << 9) |
26 | #define WC_REC_ACT_IRQ_ENABLE (1 << 8) | 26 | #define WC_REC_ACT_IRQ_ENABLE (1 << 8) |
27 | 27 | ||
diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c index 2e7fc9cee9c..624701f8138 100644 --- a/drivers/tty/serial/msm_serial_hs.c +++ b/drivers/tty/serial/msm_serial_hs.c | |||
@@ -495,7 +495,7 @@ static void msm_hs_pm(struct uart_port *uport, unsigned int state, | |||
495 | * | 495 | * |
496 | * Interrupts should be disabled before we are called, as | 496 | * Interrupts should be disabled before we are called, as |
497 | * we modify Set Baud rate | 497 | * we modify Set Baud rate |
498 | * Set receive stale interrupt level, dependant on Bit Rate | 498 | * Set receive stale interrupt level, dependent on Bit Rate |
499 | * Goal is to have around 8 ms before indicate stale. | 499 | * Goal is to have around 8 ms before indicate stale. |
500 | * roundup (((Bit Rate * .008) / 10) + 1 | 500 | * roundup (((Bit Rate * .008) / 10) + 1 |
501 | */ | 501 | */ |
@@ -1350,7 +1350,7 @@ static irqreturn_t msm_hs_rx_wakeup_isr(int irq, void *dev) | |||
1350 | 1350 | ||
1351 | spin_lock_irqsave(&uport->lock, flags); | 1351 | spin_lock_irqsave(&uport->lock, flags); |
1352 | if (msm_uport->clk_state == MSM_HS_CLK_OFF) { | 1352 | if (msm_uport->clk_state == MSM_HS_CLK_OFF) { |
1353 | /* ignore the first irq - it is a pending irq that occured | 1353 | /* ignore the first irq - it is a pending irq that occurred |
1354 | * before enable_irq() */ | 1354 | * before enable_irq() */ |
1355 | if (msm_uport->rx_wakeup.ignore) | 1355 | if (msm_uport->rx_wakeup.ignore) |
1356 | msm_uport->rx_wakeup.ignore = 0; | 1356 | msm_uport->rx_wakeup.ignore = 0; |
@@ -1644,7 +1644,7 @@ static int __devinit msm_hs_probe(struct platform_device *pdev) | |||
1644 | if (unlikely(uport->irq < 0)) | 1644 | if (unlikely(uport->irq < 0)) |
1645 | return -ENXIO; | 1645 | return -ENXIO; |
1646 | 1646 | ||
1647 | if (unlikely(set_irq_wake(uport->irq, 1))) | 1647 | if (unlikely(irq_set_irq_wake(uport->irq, 1))) |
1648 | return -ENXIO; | 1648 | return -ENXIO; |
1649 | 1649 | ||
1650 | if (pdata == NULL || pdata->rx_wakeup_irq < 0) | 1650 | if (pdata == NULL || pdata->rx_wakeup_irq < 0) |
@@ -1658,7 +1658,7 @@ static int __devinit msm_hs_probe(struct platform_device *pdev) | |||
1658 | if (unlikely(msm_uport->rx_wakeup.irq < 0)) | 1658 | if (unlikely(msm_uport->rx_wakeup.irq < 0)) |
1659 | return -ENXIO; | 1659 | return -ENXIO; |
1660 | 1660 | ||
1661 | if (unlikely(set_irq_wake(msm_uport->rx_wakeup.irq, 1))) | 1661 | if (unlikely(irq_set_irq_wake(msm_uport->rx_wakeup.irq, 1))) |
1662 | return -ENXIO; | 1662 | return -ENXIO; |
1663 | } | 1663 | } |
1664 | 1664 | ||
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 763537943a5..47cadf47414 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * the Free Software Foundation; either version 2 of the License, or | 13 | * the Free Software Foundation; either version 2 of the License, or |
14 | * (at your option) any later version. | 14 | * (at your option) any later version. |
15 | * | 15 | * |
16 | * Note: This driver is made seperate from 8250 driver as we cannot | 16 | * Note: This driver is made separate from 8250 driver as we cannot |
17 | * over load 8250 driver with omap platform specific configuration for | 17 | * over load 8250 driver with omap platform specific configuration for |
18 | * features like DMA, it makes easier to implement features like DMA and | 18 | * features like DMA, it makes easier to implement features like DMA and |
19 | * hardware flow control and software flow control configuration with | 19 | * hardware flow control and software flow control configuration with |
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 5b9cde79e4e..e1c8d4f1ce5 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c | |||
@@ -330,7 +330,7 @@ static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap) | |||
330 | * When that happens, I disable the receive side of the driver. | 330 | * When that happens, I disable the receive side of the driver. |
331 | * Note that what I've been experiencing is a real irq loop where | 331 | * Note that what I've been experiencing is a real irq loop where |
332 | * I'm getting flooded regardless of the actual port speed. | 332 | * I'm getting flooded regardless of the actual port speed. |
333 | * Something stange is going on with the HW | 333 | * Something strange is going on with the HW |
334 | */ | 334 | */ |
335 | if ((++loops) > 1000) | 335 | if ((++loops) > 1000) |
336 | goto flood; | 336 | goto flood; |
@@ -396,7 +396,7 @@ static void pmz_transmit_chars(struct uart_pmac_port *uap) | |||
396 | * be nice to transmit console writes just like we normally would for | 396 | * be nice to transmit console writes just like we normally would for |
397 | * a TTY line. (ie. buffered and TX interrupt driven). That is not | 397 | * a TTY line. (ie. buffered and TX interrupt driven). That is not |
398 | * easy because console writes cannot sleep. One solution might be | 398 | * easy because console writes cannot sleep. One solution might be |
399 | * to poll on enough port->xmit space becomming free. -DaveM | 399 | * to poll on enough port->xmit space becoming free. -DaveM |
400 | */ | 400 | */ |
401 | if (!(status & Tx_BUF_EMP)) | 401 | if (!(status & Tx_BUF_EMP)) |
402 | return; | 402 | return; |
@@ -809,7 +809,7 @@ static int pmz_set_scc_power(struct uart_pmac_port *uap, int state) | |||
809 | #endif /* !CONFIG_PPC_PMAC */ | 809 | #endif /* !CONFIG_PPC_PMAC */ |
810 | 810 | ||
811 | /* | 811 | /* |
812 | * FixZeroBug....Works around a bug in the SCC receving channel. | 812 | * FixZeroBug....Works around a bug in the SCC receiving channel. |
813 | * Inspired from Darwin code, 15 Sept. 2000 -DanM | 813 | * Inspired from Darwin code, 15 Sept. 2000 -DanM |
814 | * | 814 | * |
815 | * The following sequence prevents a problem that is seen with O'Hare ASICs | 815 | * The following sequence prevents a problem that is seen with O'Hare ASICs |
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 2335edafe90..9e2fa8d784e 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
@@ -64,7 +64,7 @@ | |||
64 | #define tx_enabled(port) ((port)->unused[0]) | 64 | #define tx_enabled(port) ((port)->unused[0]) |
65 | #define rx_enabled(port) ((port)->unused[1]) | 65 | #define rx_enabled(port) ((port)->unused[1]) |
66 | 66 | ||
67 | /* flag to ignore all characters comming in */ | 67 | /* flag to ignore all characters coming in */ |
68 | #define RXSTAT_DUMMY_READ (0x10000000) | 68 | #define RXSTAT_DUMMY_READ (0x10000000) |
69 | 69 | ||
70 | static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port) | 70 | static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port) |
@@ -291,7 +291,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id) | |||
291 | goto out; | 291 | goto out; |
292 | } | 292 | } |
293 | 293 | ||
294 | /* if there isnt anything more to transmit, or the uart is now | 294 | /* if there isn't anything more to transmit, or the uart is now |
295 | * stopped, disable the uart and exit | 295 | * stopped, disable the uart and exit |
296 | */ | 296 | */ |
297 | 297 | ||
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index eb7958c675a..920a6f929c8 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -812,7 +812,7 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) | |||
812 | } | 812 | } |
813 | 813 | ||
814 | /* | 814 | /* |
815 | * Here we define a transistion notifier so that we can update all of our | 815 | * Here we define a transition notifier so that we can update all of our |
816 | * ports' baud rate when the peripheral clock changes. | 816 | * ports' baud rate when the peripheral clock changes. |
817 | */ | 817 | */ |
818 | static int sci_notifier(struct notifier_block *self, | 818 | static int sci_notifier(struct notifier_block *self, |
@@ -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"; |
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c index cff9a306660..377ae74e715 100644 --- a/drivers/tty/serial/sn_console.c +++ b/drivers/tty/serial/sn_console.c | |||
@@ -146,7 +146,7 @@ static struct sn_sal_ops intr_ops = { | |||
146 | }; | 146 | }; |
147 | 147 | ||
148 | /* the console does output in two distinctly different ways: | 148 | /* the console does output in two distinctly different ways: |
149 | * synchronous (raw) and asynchronous (buffered). initally, early_printk | 149 | * synchronous (raw) and asynchronous (buffered). initially, early_printk |
150 | * does synchronous output. any data written goes directly to the SAL | 150 | * does synchronous output. any data written goes directly to the SAL |
151 | * to be output (incidentally, it is internally buffered by the SAL) | 151 | * to be output (incidentally, it is internally buffered by the SAL) |
152 | * after interrupts and timers are initialized and available for use, | 152 | * after interrupts and timers are initialized and available for use, |
@@ -481,7 +481,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags) | |||
481 | while (port->sc_ops->sal_input_pending()) { | 481 | while (port->sc_ops->sal_input_pending()) { |
482 | ch = port->sc_ops->sal_getc(); | 482 | ch = port->sc_ops->sal_getc(); |
483 | if (ch < 0) { | 483 | if (ch < 0) { |
484 | printk(KERN_ERR "sn_console: An error occured while " | 484 | printk(KERN_ERR "sn_console: An error occurred while " |
485 | "obtaining data from the console (0x%0x)\n", ch); | 485 | "obtaining data from the console (0x%0x)\n", ch); |
486 | break; | 486 | break; |
487 | } | 487 | } |
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c index 99ff9abf57c..8e916e76b7b 100644 --- a/drivers/tty/serial/sunzilog.c +++ b/drivers/tty/serial/sunzilog.c | |||
@@ -474,7 +474,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, | |||
474 | * be nice to transmit console writes just like we normally would for | 474 | * be nice to transmit console writes just like we normally would for |
475 | * a TTY line. (ie. buffered and TX interrupt driven). That is not | 475 | * a TTY line. (ie. buffered and TX interrupt driven). That is not |
476 | * easy because console writes cannot sleep. One solution might be | 476 | * easy because console writes cannot sleep. One solution might be |
477 | * to poll on enough port->xmit space becomming free. -DaveM | 477 | * to poll on enough port->xmit space becoming free. -DaveM |
478 | */ | 478 | */ |
479 | if (!(status & Tx_BUF_EMP)) | 479 | if (!(status & Tx_BUF_EMP)) |
480 | return; | 480 | return; |
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c index 18888d005a0..27da23d98e3 100644 --- a/drivers/tty/synclink.c +++ b/drivers/tty/synclink.c | |||
@@ -4072,7 +4072,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
4072 | 4072 | ||
4073 | if ( request_irq(info->irq_level,mgsl_interrupt,info->irq_flags, | 4073 | if ( request_irq(info->irq_level,mgsl_interrupt,info->irq_flags, |
4074 | info->device_name, info ) < 0 ) { | 4074 | info->device_name, info ) < 0 ) { |
4075 | printk( "%s(%d):Cant request interrupt on device %s IRQ=%d\n", | 4075 | printk( "%s(%d):Can't request interrupt on device %s IRQ=%d\n", |
4076 | __FILE__,__LINE__,info->device_name, info->irq_level ); | 4076 | __FILE__,__LINE__,info->device_name, info->irq_level ); |
4077 | goto errout; | 4077 | goto errout; |
4078 | } | 4078 | } |
@@ -4095,7 +4095,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
4095 | info->memory_base = ioremap_nocache(info->phys_memory_base, | 4095 | info->memory_base = ioremap_nocache(info->phys_memory_base, |
4096 | 0x40000); | 4096 | 0x40000); |
4097 | if (!info->memory_base) { | 4097 | if (!info->memory_base) { |
4098 | printk( "%s(%d):Cant map shared memory on device %s MemAddr=%08X\n", | 4098 | printk( "%s(%d):Can't map shared memory on device %s MemAddr=%08X\n", |
4099 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); | 4099 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); |
4100 | goto errout; | 4100 | goto errout; |
4101 | } | 4101 | } |
@@ -4109,7 +4109,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
4109 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, | 4109 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, |
4110 | PAGE_SIZE); | 4110 | PAGE_SIZE); |
4111 | if (!info->lcr_base) { | 4111 | if (!info->lcr_base) { |
4112 | printk( "%s(%d):Cant map LCR memory on device %s MemAddr=%08X\n", | 4112 | printk( "%s(%d):Can't map LCR memory on device %s MemAddr=%08X\n", |
4113 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); | 4113 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); |
4114 | goto errout; | 4114 | goto errout; |
4115 | } | 4115 | } |
@@ -4119,7 +4119,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
4119 | /* claim DMA channel */ | 4119 | /* claim DMA channel */ |
4120 | 4120 | ||
4121 | if (request_dma(info->dma_level,info->device_name) < 0){ | 4121 | if (request_dma(info->dma_level,info->device_name) < 0){ |
4122 | printk( "%s(%d):Cant request DMA channel on device %s DMA=%d\n", | 4122 | printk( "%s(%d):Can't request DMA channel on device %s DMA=%d\n", |
4123 | __FILE__,__LINE__,info->device_name, info->dma_level ); | 4123 | __FILE__,__LINE__,info->device_name, info->dma_level ); |
4124 | mgsl_release_resources( info ); | 4124 | mgsl_release_resources( info ); |
4125 | return -ENODEV; | 4125 | return -ENODEV; |
@@ -4132,7 +4132,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info) | |||
4132 | } | 4132 | } |
4133 | 4133 | ||
4134 | if ( mgsl_allocate_dma_buffers(info) < 0 ) { | 4134 | if ( mgsl_allocate_dma_buffers(info) < 0 ) { |
4135 | printk( "%s(%d):Cant allocate DMA buffers on device %s DMA=%d\n", | 4135 | printk( "%s(%d):Can't allocate DMA buffers on device %s DMA=%d\n", |
4136 | __FILE__,__LINE__,info->device_name, info->dma_level ); | 4136 | __FILE__,__LINE__,info->device_name, info->dma_level ); |
4137 | goto errout; | 4137 | goto errout; |
4138 | } | 4138 | } |
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index a35dd549a00..18b48cd3b41 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c | |||
@@ -3491,7 +3491,7 @@ static int claim_resources(struct slgt_info *info) | |||
3491 | 3491 | ||
3492 | info->reg_addr = ioremap_nocache(info->phys_reg_addr, SLGT_REG_SIZE); | 3492 | info->reg_addr = ioremap_nocache(info->phys_reg_addr, SLGT_REG_SIZE); |
3493 | if (!info->reg_addr) { | 3493 | if (!info->reg_addr) { |
3494 | DBGERR(("%s cant map device registers, addr=%08X\n", | 3494 | DBGERR(("%s can't map device registers, addr=%08X\n", |
3495 | info->device_name, info->phys_reg_addr)); | 3495 | info->device_name, info->phys_reg_addr)); |
3496 | info->init_error = DiagStatus_CantAssignPciResources; | 3496 | info->init_error = DiagStatus_CantAssignPciResources; |
3497 | goto errout; | 3497 | goto errout; |
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c index 32734369447..c77831c7675 100644 --- a/drivers/tty/synclinkmp.c +++ b/drivers/tty/synclinkmp.c | |||
@@ -3595,7 +3595,7 @@ static int claim_resources(SLMP_INFO *info) | |||
3595 | info->memory_base = ioremap_nocache(info->phys_memory_base, | 3595 | info->memory_base = ioremap_nocache(info->phys_memory_base, |
3596 | SCA_MEM_SIZE); | 3596 | SCA_MEM_SIZE); |
3597 | if (!info->memory_base) { | 3597 | if (!info->memory_base) { |
3598 | printk( "%s(%d):%s Cant map shared memory, MemAddr=%08X\n", | 3598 | printk( "%s(%d):%s Can't map shared memory, MemAddr=%08X\n", |
3599 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); | 3599 | __FILE__,__LINE__,info->device_name, info->phys_memory_base ); |
3600 | info->init_error = DiagStatus_CantAssignPciResources; | 3600 | info->init_error = DiagStatus_CantAssignPciResources; |
3601 | goto errout; | 3601 | goto errout; |
@@ -3603,7 +3603,7 @@ static int claim_resources(SLMP_INFO *info) | |||
3603 | 3603 | ||
3604 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, PAGE_SIZE); | 3604 | info->lcr_base = ioremap_nocache(info->phys_lcr_base, PAGE_SIZE); |
3605 | if (!info->lcr_base) { | 3605 | if (!info->lcr_base) { |
3606 | printk( "%s(%d):%s Cant map LCR memory, MemAddr=%08X\n", | 3606 | printk( "%s(%d):%s Can't map LCR memory, MemAddr=%08X\n", |
3607 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); | 3607 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); |
3608 | info->init_error = DiagStatus_CantAssignPciResources; | 3608 | info->init_error = DiagStatus_CantAssignPciResources; |
3609 | goto errout; | 3609 | goto errout; |
@@ -3612,7 +3612,7 @@ static int claim_resources(SLMP_INFO *info) | |||
3612 | 3612 | ||
3613 | info->sca_base = ioremap_nocache(info->phys_sca_base, PAGE_SIZE); | 3613 | info->sca_base = ioremap_nocache(info->phys_sca_base, PAGE_SIZE); |
3614 | if (!info->sca_base) { | 3614 | if (!info->sca_base) { |
3615 | printk( "%s(%d):%s Cant map SCA memory, MemAddr=%08X\n", | 3615 | printk( "%s(%d):%s Can't map SCA memory, MemAddr=%08X\n", |
3616 | __FILE__,__LINE__,info->device_name, info->phys_sca_base ); | 3616 | __FILE__,__LINE__,info->device_name, info->phys_sca_base ); |
3617 | info->init_error = DiagStatus_CantAssignPciResources; | 3617 | info->init_error = DiagStatus_CantAssignPciResources; |
3618 | goto errout; | 3618 | goto errout; |
@@ -3622,7 +3622,7 @@ static int claim_resources(SLMP_INFO *info) | |||
3622 | info->statctrl_base = ioremap_nocache(info->phys_statctrl_base, | 3622 | info->statctrl_base = ioremap_nocache(info->phys_statctrl_base, |
3623 | PAGE_SIZE); | 3623 | PAGE_SIZE); |
3624 | if (!info->statctrl_base) { | 3624 | if (!info->statctrl_base) { |
3625 | printk( "%s(%d):%s Cant map SCA Status/Control memory, MemAddr=%08X\n", | 3625 | printk( "%s(%d):%s Can't map SCA Status/Control memory, MemAddr=%08X\n", |
3626 | __FILE__,__LINE__,info->device_name, info->phys_statctrl_base ); | 3626 | __FILE__,__LINE__,info->device_name, info->phys_statctrl_base ); |
3627 | info->init_error = DiagStatus_CantAssignPciResources; | 3627 | info->init_error = DiagStatus_CantAssignPciResources; |
3628 | goto errout; | 3628 | goto errout; |
@@ -3869,7 +3869,7 @@ static void device_init(int adapter_num, struct pci_dev *pdev) | |||
3869 | port_array[0]->irq_flags, | 3869 | port_array[0]->irq_flags, |
3870 | port_array[0]->device_name, | 3870 | port_array[0]->device_name, |
3871 | port_array[0]) < 0 ) { | 3871 | port_array[0]) < 0 ) { |
3872 | printk( "%s(%d):%s Cant request interrupt, IRQ=%d\n", | 3872 | printk( "%s(%d):%s Can't request interrupt, IRQ=%d\n", |
3873 | __FILE__,__LINE__, | 3873 | __FILE__,__LINE__, |
3874 | port_array[0]->device_name, | 3874 | port_array[0]->device_name, |
3875 | port_array[0]->irq_level ); | 3875 | port_array[0]->irq_level ); |
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 81f13958e75..43db715f150 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c | |||
@@ -306,7 +306,7 @@ static struct sysrq_key_op sysrq_ftrace_dump_op = { | |||
306 | 306 | ||
307 | static void sysrq_handle_showmem(int key) | 307 | static void sysrq_handle_showmem(int key) |
308 | { | 308 | { |
309 | show_mem(); | 309 | show_mem(0); |
310 | } | 310 | } |
311 | static struct sysrq_key_op sysrq_showmem_op = { | 311 | static struct sysrq_key_op sysrq_showmem_op = { |
312 | .handler = sysrq_handle_showmem, | 312 | .handler = sysrq_handle_showmem, |
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index d8210ca0072..f1a7918d71a 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c | |||
@@ -322,7 +322,7 @@ void tty_schedule_flip(struct tty_struct *tty) | |||
322 | if (tty->buf.tail != NULL) | 322 | if (tty->buf.tail != NULL) |
323 | tty->buf.tail->commit = tty->buf.tail->used; | 323 | tty->buf.tail->commit = tty->buf.tail->used; |
324 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 324 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
325 | schedule_delayed_work(&tty->buf.work, 1); | 325 | schedule_work(&tty->buf.work); |
326 | } | 326 | } |
327 | EXPORT_SYMBOL(tty_schedule_flip); | 327 | EXPORT_SYMBOL(tty_schedule_flip); |
328 | 328 | ||
@@ -402,7 +402,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string_flags); | |||
402 | static void flush_to_ldisc(struct work_struct *work) | 402 | static void flush_to_ldisc(struct work_struct *work) |
403 | { | 403 | { |
404 | struct tty_struct *tty = | 404 | struct tty_struct *tty = |
405 | container_of(work, struct tty_struct, buf.work.work); | 405 | container_of(work, struct tty_struct, buf.work); |
406 | unsigned long flags; | 406 | unsigned long flags; |
407 | struct tty_ldisc *disc; | 407 | struct tty_ldisc *disc; |
408 | 408 | ||
@@ -442,10 +442,8 @@ static void flush_to_ldisc(struct work_struct *work) | |||
442 | line discipline as we want to empty the queue */ | 442 | line discipline as we want to empty the queue */ |
443 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) | 443 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) |
444 | break; | 444 | break; |
445 | if (!tty->receive_room || seen_tail) { | 445 | if (!tty->receive_room || seen_tail) |
446 | schedule_delayed_work(&tty->buf.work, 1); | ||
447 | break; | 446 | break; |
448 | } | ||
449 | if (count > tty->receive_room) | 447 | if (count > tty->receive_room) |
450 | count = tty->receive_room; | 448 | count = tty->receive_room; |
451 | char_buf = head->char_buf_ptr + head->read; | 449 | char_buf = head->char_buf_ptr + head->read; |
@@ -481,7 +479,7 @@ static void flush_to_ldisc(struct work_struct *work) | |||
481 | */ | 479 | */ |
482 | void tty_flush_to_ldisc(struct tty_struct *tty) | 480 | void tty_flush_to_ldisc(struct tty_struct *tty) |
483 | { | 481 | { |
484 | flush_delayed_work(&tty->buf.work); | 482 | flush_work(&tty->buf.work); |
485 | } | 483 | } |
486 | 484 | ||
487 | /** | 485 | /** |
@@ -506,9 +504,9 @@ void tty_flip_buffer_push(struct tty_struct *tty) | |||
506 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 504 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
507 | 505 | ||
508 | if (tty->low_latency) | 506 | if (tty->low_latency) |
509 | flush_to_ldisc(&tty->buf.work.work); | 507 | flush_to_ldisc(&tty->buf.work); |
510 | else | 508 | else |
511 | schedule_delayed_work(&tty->buf.work, 1); | 509 | schedule_work(&tty->buf.work); |
512 | } | 510 | } |
513 | EXPORT_SYMBOL(tty_flip_buffer_push); | 511 | EXPORT_SYMBOL(tty_flip_buffer_push); |
514 | 512 | ||
@@ -529,6 +527,6 @@ void tty_buffer_init(struct tty_struct *tty) | |||
529 | tty->buf.tail = NULL; | 527 | tty->buf.tail = NULL; |
530 | tty->buf.free = NULL; | 528 | tty->buf.free = NULL; |
531 | tty->buf.memory_used = 0; | 529 | tty->buf.memory_used = 0; |
532 | INIT_DELAYED_WORK(&tty->buf.work, flush_to_ldisc); | 530 | INIT_WORK(&tty->buf.work, flush_to_ldisc); |
533 | } | 531 | } |
534 | 532 | ||
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 936a4ead6c2..d7d50b48287 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -2134,7 +2134,7 @@ done: | |||
2134 | * actually has driver level meaning and triggers a VC resize. | 2134 | * actually has driver level meaning and triggers a VC resize. |
2135 | * | 2135 | * |
2136 | * Locking: | 2136 | * Locking: |
2137 | * Driver dependant. The default do_resize method takes the | 2137 | * Driver dependent. The default do_resize method takes the |
2138 | * tty termios mutex and ctrl_lock. The console takes its own lock | 2138 | * tty termios mutex and ctrl_lock. The console takes its own lock |
2139 | * then calls into the default method. | 2139 | * then calls into the default method. |
2140 | */ | 2140 | */ |
@@ -2155,7 +2155,7 @@ static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg) | |||
2155 | * tioccons - allow admin to move logical console | 2155 | * tioccons - allow admin to move logical console |
2156 | * @file: the file to become console | 2156 | * @file: the file to become console |
2157 | * | 2157 | * |
2158 | * Allow the adminstrator to move the redirected console device | 2158 | * Allow the administrator to move the redirected console device |
2159 | * | 2159 | * |
2160 | * Locking: uses redirect_lock to guard the redirect information | 2160 | * Locking: uses redirect_lock to guard the redirect information |
2161 | */ | 2161 | */ |
@@ -2290,7 +2290,7 @@ EXPORT_SYMBOL_GPL(tty_get_pgrp); | |||
2290 | /** | 2290 | /** |
2291 | * tiocgpgrp - get process group | 2291 | * tiocgpgrp - get process group |
2292 | * @tty: tty passed by user | 2292 | * @tty: tty passed by user |
2293 | * @real_tty: tty side of the tty pased by the user if a pty else the tty | 2293 | * @real_tty: tty side of the tty passed by the user if a pty else the tty |
2294 | * @p: returned pid | 2294 | * @p: returned pid |
2295 | * | 2295 | * |
2296 | * Obtain the process group of the tty. If there is no process group | 2296 | * Obtain the process group of the tty. If there is no process group |
@@ -2367,7 +2367,7 @@ out_unlock: | |||
2367 | /** | 2367 | /** |
2368 | * tiocgsid - get session id | 2368 | * tiocgsid - get session id |
2369 | * @tty: tty passed by user | 2369 | * @tty: tty passed by user |
2370 | * @real_tty: tty side of the tty pased by the user if a pty else the tty | 2370 | * @real_tty: tty side of the tty passed by the user if a pty else the tty |
2371 | * @p: pointer to returned session id | 2371 | * @p: pointer to returned session id |
2372 | * | 2372 | * |
2373 | * Obtain the session id of the tty. If there is no session | 2373 | * Obtain the session id of the tty. If there is no session |
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c index d73c593795a..620c971422b 100644 --- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c | |||
@@ -247,7 +247,7 @@ speed_t tty_termios_baud_rate(struct ktermios *termios) | |||
247 | cbaud = termios->c_cflag & CBAUD; | 247 | cbaud = termios->c_cflag & CBAUD; |
248 | 248 | ||
249 | #ifdef BOTHER | 249 | #ifdef BOTHER |
250 | /* Magic token for arbitary speed via c_ispeed/c_ospeed */ | 250 | /* Magic token for arbitrary speed via c_ispeed/c_ospeed */ |
251 | if (cbaud == BOTHER) | 251 | if (cbaud == BOTHER) |
252 | return termios->c_ospeed; | 252 | return termios->c_ospeed; |
253 | #endif | 253 | #endif |
@@ -283,7 +283,7 @@ speed_t tty_termios_input_baud_rate(struct ktermios *termios) | |||
283 | if (cbaud == B0) | 283 | if (cbaud == B0) |
284 | return tty_termios_baud_rate(termios); | 284 | return tty_termios_baud_rate(termios); |
285 | 285 | ||
286 | /* Magic token for arbitary speed via c_ispeed*/ | 286 | /* Magic token for arbitrary speed via c_ispeed*/ |
287 | if (cbaud == BOTHER) | 287 | if (cbaud == BOTHER) |
288 | return termios->c_ispeed; | 288 | return termios->c_ispeed; |
289 | 289 | ||
@@ -449,7 +449,7 @@ EXPORT_SYMBOL(tty_get_baud_rate); | |||
449 | * @new: New termios | 449 | * @new: New termios |
450 | * @old: Old termios | 450 | * @old: Old termios |
451 | * | 451 | * |
452 | * Propogate the hardware specific terminal setting bits from | 452 | * Propagate the hardware specific terminal setting bits from |
453 | * the old termios structure to the new one. This is used in cases | 453 | * the old termios structure to the new one. This is used in cases |
454 | * where the hardware does not support reconfiguration or as a helper | 454 | * where the hardware does not support reconfiguration or as a helper |
455 | * in some cases where only minimal reconfiguration is supported | 455 | * in some cases where only minimal reconfiguration is supported |
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index 0fc564a9770..e19e1364711 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c | |||
@@ -529,7 +529,7 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old) | |||
529 | static int tty_ldisc_halt(struct tty_struct *tty) | 529 | static int tty_ldisc_halt(struct tty_struct *tty) |
530 | { | 530 | { |
531 | clear_bit(TTY_LDISC, &tty->flags); | 531 | clear_bit(TTY_LDISC, &tty->flags); |
532 | return cancel_delayed_work_sync(&tty->buf.work); | 532 | return cancel_work_sync(&tty->buf.work); |
533 | } | 533 | } |
534 | 534 | ||
535 | /** | 535 | /** |
@@ -542,7 +542,7 @@ static void tty_ldisc_flush_works(struct tty_struct *tty) | |||
542 | { | 542 | { |
543 | flush_work_sync(&tty->hangup_work); | 543 | flush_work_sync(&tty->hangup_work); |
544 | flush_work_sync(&tty->SAK_work); | 544 | flush_work_sync(&tty->SAK_work); |
545 | flush_delayed_work_sync(&tty->buf.work); | 545 | flush_work_sync(&tty->buf.work); |
546 | } | 546 | } |
547 | 547 | ||
548 | /** | 548 | /** |
@@ -722,9 +722,9 @@ enable: | |||
722 | /* Restart the work queue in case no characters kick it off. Safe if | 722 | /* Restart the work queue in case no characters kick it off. Safe if |
723 | already running */ | 723 | already running */ |
724 | if (work) | 724 | if (work) |
725 | schedule_delayed_work(&tty->buf.work, 1); | 725 | schedule_work(&tty->buf.work); |
726 | if (o_work) | 726 | if (o_work) |
727 | schedule_delayed_work(&o_tty->buf.work, 1); | 727 | schedule_work(&o_tty->buf.work); |
728 | mutex_unlock(&tty->ldisc_mutex); | 728 | mutex_unlock(&tty->ldisc_mutex); |
729 | tty_unlock(); | 729 | tty_unlock(); |
730 | return retval; | 730 | return retval; |
@@ -830,12 +830,12 @@ void tty_ldisc_hangup(struct tty_struct *tty) | |||
830 | 830 | ||
831 | /* | 831 | /* |
832 | * this is like tty_ldisc_halt, but we need to give up | 832 | * this is like tty_ldisc_halt, but we need to give up |
833 | * the BTM before calling cancel_delayed_work_sync, | 833 | * the BTM before calling cancel_work_sync, which may |
834 | * which may need to wait for another function taking the BTM | 834 | * need to wait for another function taking the BTM |
835 | */ | 835 | */ |
836 | clear_bit(TTY_LDISC, &tty->flags); | 836 | clear_bit(TTY_LDISC, &tty->flags); |
837 | tty_unlock(); | 837 | tty_unlock(); |
838 | cancel_delayed_work_sync(&tty->buf.work); | 838 | cancel_work_sync(&tty->buf.work); |
839 | mutex_unlock(&tty->ldisc_mutex); | 839 | mutex_unlock(&tty->ldisc_mutex); |
840 | 840 | ||
841 | tty_lock(); | 841 | tty_lock(); |
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 6dd3c68c13a..d6b342b5b42 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c | |||
@@ -600,7 +600,7 @@ static void fn_scroll_back(struct vc_data *vc) | |||
600 | 600 | ||
601 | static void fn_show_mem(struct vc_data *vc) | 601 | static void fn_show_mem(struct vc_data *vc) |
602 | { | 602 | { |
603 | show_mem(); | 603 | show_mem(0); |
604 | } | 604 | } |
605 | 605 | ||
606 | static void fn_show_state(struct vc_data *vc) | 606 | static void fn_show_state(struct vc_data *vc) |
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index c83cdfb56fc..4bea1efaec9 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c | |||
@@ -3963,7 +3963,7 @@ void reset_palette(struct vc_data *vc) | |||
3963 | * of 32 pixels. Userspace fontdata is stored with 32 bytes (shorts/ints, | 3963 | * of 32 pixels. Userspace fontdata is stored with 32 bytes (shorts/ints, |
3964 | * depending on width) reserved for each character which is kinda wasty, but | 3964 | * depending on width) reserved for each character which is kinda wasty, but |
3965 | * this is done in order to maintain compatibility with the EGA/VGA fonts. It | 3965 | * this is done in order to maintain compatibility with the EGA/VGA fonts. It |
3966 | * is upto the actual low-level console-driver convert data into its favorite | 3966 | * is up to the actual low-level console-driver convert data into its favorite |
3967 | * format (maybe we should add a `fontoffset' field to the `display' | 3967 | * format (maybe we should add a `fontoffset' field to the `display' |
3968 | * structure so we won't have to convert the fontdata all the time. | 3968 | * structure so we won't have to convert the fontdata all the time. |
3969 | * /Jes | 3969 | * /Jes |