aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/ioc4_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/ioc4_serial.c')
-rw-r--r--drivers/serial/ioc4_serial.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index e5c58fe7e745..2055d323f15f 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -1627,25 +1627,25 @@ static void transmit_chars(struct uart_port *the_port)
1627 char *start; 1627 char *start;
1628 struct tty_struct *tty; 1628 struct tty_struct *tty;
1629 struct ioc4_port *port = get_ioc4_port(the_port, 0); 1629 struct ioc4_port *port = get_ioc4_port(the_port, 0);
1630 struct uart_info *info; 1630 struct uart_state *state;
1631 1631
1632 if (!the_port) 1632 if (!the_port)
1633 return; 1633 return;
1634 if (!port) 1634 if (!port)
1635 return; 1635 return;
1636 1636
1637 info = the_port->info; 1637 state = the_port->state;
1638 tty = info->port.tty; 1638 tty = state->port.tty;
1639 1639
1640 if (uart_circ_empty(&info->xmit) || uart_tx_stopped(the_port)) { 1640 if (uart_circ_empty(&state->xmit) || uart_tx_stopped(the_port)) {
1641 /* Nothing to do or hw stopped */ 1641 /* Nothing to do or hw stopped */
1642 set_notification(port, N_ALL_OUTPUT, 0); 1642 set_notification(port, N_ALL_OUTPUT, 0);
1643 return; 1643 return;
1644 } 1644 }
1645 1645
1646 head = info->xmit.head; 1646 head = state->xmit.head;
1647 tail = info->xmit.tail; 1647 tail = state->xmit.tail;
1648 start = (char *)&info->xmit.buf[tail]; 1648 start = (char *)&state->xmit.buf[tail];
1649 1649
1650 /* write out all the data or until the end of the buffer */ 1650 /* write out all the data or until the end of the buffer */
1651 xmit_count = (head < tail) ? (UART_XMIT_SIZE - tail) : (head - tail); 1651 xmit_count = (head < tail) ? (UART_XMIT_SIZE - tail) : (head - tail);
@@ -1658,14 +1658,14 @@ static void transmit_chars(struct uart_port *the_port)
1658 /* advance the pointers */ 1658 /* advance the pointers */
1659 tail += result; 1659 tail += result;
1660 tail &= UART_XMIT_SIZE - 1; 1660 tail &= UART_XMIT_SIZE - 1;
1661 info->xmit.tail = tail; 1661 state->xmit.tail = tail;
1662 start = (char *)&info->xmit.buf[tail]; 1662 start = (char *)&state->xmit.buf[tail];
1663 } 1663 }
1664 } 1664 }
1665 if (uart_circ_chars_pending(&info->xmit) < WAKEUP_CHARS) 1665 if (uart_circ_chars_pending(&state->xmit) < WAKEUP_CHARS)
1666 uart_write_wakeup(the_port); 1666 uart_write_wakeup(the_port);
1667 1667
1668 if (uart_circ_empty(&info->xmit)) { 1668 if (uart_circ_empty(&state->xmit)) {
1669 set_notification(port, N_OUTPUT_LOWAT, 0); 1669 set_notification(port, N_OUTPUT_LOWAT, 0);
1670 } else { 1670 } else {
1671 set_notification(port, N_OUTPUT_LOWAT, 1); 1671 set_notification(port, N_OUTPUT_LOWAT, 1);
@@ -1686,7 +1686,7 @@ ioc4_change_speed(struct uart_port *the_port,
1686 int baud, bits; 1686 int baud, bits;
1687 unsigned cflag; 1687 unsigned cflag;
1688 int new_parity = 0, new_parity_enable = 0, new_stop = 0, new_data = 8; 1688 int new_parity = 0, new_parity_enable = 0, new_stop = 0, new_data = 8;
1689 struct uart_info *info = the_port->info; 1689 struct uart_state *state = the_port->state;
1690 1690
1691 cflag = new_termios->c_cflag; 1691 cflag = new_termios->c_cflag;
1692 1692
@@ -1738,14 +1738,14 @@ ioc4_change_speed(struct uart_port *the_port,
1738 1738
1739 the_port->ignore_status_mask = N_ALL_INPUT; 1739 the_port->ignore_status_mask = N_ALL_INPUT;
1740 1740
1741 info->port.tty->low_latency = 1; 1741 state->port.tty->low_latency = 1;
1742 1742
1743 if (I_IGNPAR(info->port.tty)) 1743 if (I_IGNPAR(state->port.tty))
1744 the_port->ignore_status_mask &= ~(N_PARITY_ERROR 1744 the_port->ignore_status_mask &= ~(N_PARITY_ERROR
1745 | N_FRAMING_ERROR); 1745 | N_FRAMING_ERROR);
1746 if (I_IGNBRK(info->port.tty)) { 1746 if (I_IGNBRK(state->port.tty)) {
1747 the_port->ignore_status_mask &= ~N_BREAK; 1747 the_port->ignore_status_mask &= ~N_BREAK;
1748 if (I_IGNPAR(info->port.tty)) 1748 if (I_IGNPAR(state->port.tty))
1749 the_port->ignore_status_mask &= ~N_OVERRUN_ERROR; 1749 the_port->ignore_status_mask &= ~N_OVERRUN_ERROR;
1750 } 1750 }
1751 if (!(cflag & CREAD)) { 1751 if (!(cflag & CREAD)) {
@@ -1784,7 +1784,7 @@ ioc4_change_speed(struct uart_port *the_port,
1784static inline int ic4_startup_local(struct uart_port *the_port) 1784static inline int ic4_startup_local(struct uart_port *the_port)
1785{ 1785{
1786 struct ioc4_port *port; 1786 struct ioc4_port *port;
1787 struct uart_info *info; 1787 struct uart_state *state;
1788 1788
1789 if (!the_port) 1789 if (!the_port)
1790 return -1; 1790 return -1;
@@ -1793,7 +1793,7 @@ static inline int ic4_startup_local(struct uart_port *the_port)
1793 if (!port) 1793 if (!port)
1794 return -1; 1794 return -1;
1795 1795
1796 info = the_port->info; 1796 state = the_port->state;
1797 1797
1798 local_open(port); 1798 local_open(port);
1799 1799
@@ -1801,7 +1801,7 @@ static inline int ic4_startup_local(struct uart_port *the_port)
1801 ioc4_set_proto(port, the_port->mapbase); 1801 ioc4_set_proto(port, the_port->mapbase);
1802 1802
1803 /* set the speed of the serial port */ 1803 /* set the speed of the serial port */
1804 ioc4_change_speed(the_port, info->port.tty->termios, 1804 ioc4_change_speed(the_port, state->port.tty->termios,
1805 (struct ktermios *)0); 1805 (struct ktermios *)0);
1806 1806
1807 return 0; 1807 return 0;
@@ -1882,7 +1882,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
1882 the_port = port->ip_port; 1882 the_port = port->ip_port;
1883 the_port->icount.dcd = 1; 1883 the_port->icount.dcd = 1;
1884 wake_up_interruptible 1884 wake_up_interruptible
1885 (&the_port-> info->delta_msr_wait); 1885 (&the_port->state->delta_msr_wait);
1886 } else if ((port->ip_notify & N_DDCD) 1886 } else if ((port->ip_notify & N_DDCD)
1887 && !(shadow & IOC4_SHADOW_DCD)) { 1887 && !(shadow & IOC4_SHADOW_DCD)) {
1888 /* Flag delta DCD/no DCD */ 1888 /* Flag delta DCD/no DCD */
@@ -1904,7 +1904,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
1904 the_port->icount.cts = 1904 the_port->icount.cts =
1905 (shadow & IOC4_SHADOW_CTS) ? 1 : 0; 1905 (shadow & IOC4_SHADOW_CTS) ? 1 : 0;
1906 wake_up_interruptible 1906 wake_up_interruptible
1907 (&the_port->info->delta_msr_wait); 1907 (&the_port->state->delta_msr_wait);
1908 } 1908 }
1909 } 1909 }
1910 1910
@@ -2236,7 +2236,7 @@ static inline int do_read(struct uart_port *the_port, unsigned char *buf,
2236 && port->ip_port) { 2236 && port->ip_port) {
2237 the_port->icount.dcd = 0; 2237 the_port->icount.dcd = 0;
2238 wake_up_interruptible 2238 wake_up_interruptible
2239 (&the_port->info-> 2239 (&the_port->state->
2240 delta_msr_wait); 2240 delta_msr_wait);
2241 } 2241 }
2242 2242
@@ -2341,17 +2341,17 @@ static void receive_chars(struct uart_port *the_port)
2341 unsigned char ch[IOC4_MAX_CHARS]; 2341 unsigned char ch[IOC4_MAX_CHARS];
2342 int read_count, request_count = IOC4_MAX_CHARS; 2342 int read_count, request_count = IOC4_MAX_CHARS;
2343 struct uart_icount *icount; 2343 struct uart_icount *icount;
2344 struct uart_info *info = the_port->info; 2344 struct uart_state *state = the_port->state;
2345 unsigned long pflags; 2345 unsigned long pflags;
2346 2346
2347 /* Make sure all the pointers are "good" ones */ 2347 /* Make sure all the pointers are "good" ones */
2348 if (!info) 2348 if (!state)
2349 return; 2349 return;
2350 if (!info->port.tty) 2350 if (!state->port.tty)
2351 return; 2351 return;
2352 2352
2353 spin_lock_irqsave(&the_port->lock, pflags); 2353 spin_lock_irqsave(&the_port->lock, pflags);
2354 tty = info->port.tty; 2354 tty = state->port.tty;
2355 2355
2356 request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS); 2356 request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS);
2357 2357
@@ -2430,19 +2430,19 @@ static void ic4_shutdown(struct uart_port *the_port)
2430{ 2430{
2431 unsigned long port_flags; 2431 unsigned long port_flags;
2432 struct ioc4_port *port; 2432 struct ioc4_port *port;
2433 struct uart_info *info; 2433 struct uart_state *state;
2434 2434
2435 port = get_ioc4_port(the_port, 0); 2435 port = get_ioc4_port(the_port, 0);
2436 if (!port) 2436 if (!port)
2437 return; 2437 return;
2438 2438
2439 info = the_port->info; 2439 state = the_port->state;
2440 port->ip_port = NULL; 2440 port->ip_port = NULL;
2441 2441
2442 wake_up_interruptible(&info->delta_msr_wait); 2442 wake_up_interruptible(&state->delta_msr_wait);
2443 2443
2444 if (info->port.tty) 2444 if (state->port.tty)
2445 set_bit(TTY_IO_ERROR, &info->port.tty->flags); 2445 set_bit(TTY_IO_ERROR, &state->port.tty->flags);
2446 2446
2447 spin_lock_irqsave(&the_port->lock, port_flags); 2447 spin_lock_irqsave(&the_port->lock, port_flags);
2448 set_notification(port, N_ALL, 0); 2448 set_notification(port, N_ALL, 0);
@@ -2538,7 +2538,7 @@ static int ic4_startup(struct uart_port *the_port)
2538 int retval; 2538 int retval;
2539 struct ioc4_port *port; 2539 struct ioc4_port *port;
2540 struct ioc4_control *control; 2540 struct ioc4_control *control;
2541 struct uart_info *info; 2541 struct uart_state *state;
2542 unsigned long port_flags; 2542 unsigned long port_flags;
2543 2543
2544 if (!the_port) 2544 if (!the_port)
@@ -2546,7 +2546,7 @@ static int ic4_startup(struct uart_port *the_port)
2546 port = get_ioc4_port(the_port, 1); 2546 port = get_ioc4_port(the_port, 1);
2547 if (!port) 2547 if (!port)
2548 return -ENODEV; 2548 return -ENODEV;
2549 info = the_port->info; 2549 state = the_port->state;
2550 2550
2551 control = port->ip_control; 2551 control = port->ip_control;
2552 if (!control) { 2552 if (!control) {