diff options
author | Alan Cox <alan@linux.intel.com> | 2009-09-19 16:13:28 -0400 |
---|---|---|
committer | Live-CD User <linux@linux.site> | 2009-09-19 16:13:28 -0400 |
commit | ebd2c8f6d2ec4012c267ecb95e72a57b8355a705 (patch) | |
tree | 36a01b2ac2520bf7e0d9362b8da17d3c894da2db /drivers/serial/ioc3_serial.c | |
parent | 11d85d7b2ecc72fe752bba55389e7d11907528af (diff) |
serial: kill off uart_info
We moved this into uart_state, now move the fields out of the separate
structure and kill it off.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/ioc3_serial.c')
-rw-r--r-- | drivers/serial/ioc3_serial.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c index ae3699d77dd0..de4ab1bfee8d 100644 --- a/drivers/serial/ioc3_serial.c +++ b/drivers/serial/ioc3_serial.c | |||
@@ -897,25 +897,25 @@ static void transmit_chars(struct uart_port *the_port) | |||
897 | char *start; | 897 | char *start; |
898 | struct tty_struct *tty; | 898 | struct tty_struct *tty; |
899 | struct ioc3_port *port = get_ioc3_port(the_port); | 899 | struct ioc3_port *port = get_ioc3_port(the_port); |
900 | struct uart_info *info; | 900 | struct uart_state *state; |
901 | 901 | ||
902 | if (!the_port) | 902 | if (!the_port) |
903 | return; | 903 | return; |
904 | if (!port) | 904 | if (!port) |
905 | return; | 905 | return; |
906 | 906 | ||
907 | info = the_port->info; | 907 | state = the_port->state; |
908 | tty = info->port.tty; | 908 | tty = state->port.tty; |
909 | 909 | ||
910 | if (uart_circ_empty(&info->xmit) || uart_tx_stopped(the_port)) { | 910 | if (uart_circ_empty(&state->xmit) || uart_tx_stopped(the_port)) { |
911 | /* Nothing to do or hw stopped */ | 911 | /* Nothing to do or hw stopped */ |
912 | set_notification(port, N_ALL_OUTPUT, 0); | 912 | set_notification(port, N_ALL_OUTPUT, 0); |
913 | return; | 913 | return; |
914 | } | 914 | } |
915 | 915 | ||
916 | head = info->xmit.head; | 916 | head = state->xmit.head; |
917 | tail = info->xmit.tail; | 917 | tail = state->xmit.tail; |
918 | start = (char *)&info->xmit.buf[tail]; | 918 | start = (char *)&state->xmit.buf[tail]; |
919 | 919 | ||
920 | /* write out all the data or until the end of the buffer */ | 920 | /* write out all the data or until the end of the buffer */ |
921 | xmit_count = (head < tail) ? (UART_XMIT_SIZE - tail) : (head - tail); | 921 | xmit_count = (head < tail) ? (UART_XMIT_SIZE - tail) : (head - tail); |
@@ -928,14 +928,14 @@ static void transmit_chars(struct uart_port *the_port) | |||
928 | /* advance the pointers */ | 928 | /* advance the pointers */ |
929 | tail += result; | 929 | tail += result; |
930 | tail &= UART_XMIT_SIZE - 1; | 930 | tail &= UART_XMIT_SIZE - 1; |
931 | info->xmit.tail = tail; | 931 | state->xmit.tail = tail; |
932 | start = (char *)&info->xmit.buf[tail]; | 932 | start = (char *)&state->xmit.buf[tail]; |
933 | } | 933 | } |
934 | } | 934 | } |
935 | if (uart_circ_chars_pending(&info->xmit) < WAKEUP_CHARS) | 935 | if (uart_circ_chars_pending(&state->xmit) < WAKEUP_CHARS) |
936 | uart_write_wakeup(the_port); | 936 | uart_write_wakeup(the_port); |
937 | 937 | ||
938 | if (uart_circ_empty(&info->xmit)) { | 938 | if (uart_circ_empty(&state->xmit)) { |
939 | set_notification(port, N_OUTPUT_LOWAT, 0); | 939 | set_notification(port, N_OUTPUT_LOWAT, 0); |
940 | } else { | 940 | } else { |
941 | set_notification(port, N_OUTPUT_LOWAT, 1); | 941 | set_notification(port, N_OUTPUT_LOWAT, 1); |
@@ -956,7 +956,7 @@ ioc3_change_speed(struct uart_port *the_port, | |||
956 | unsigned int cflag; | 956 | unsigned int cflag; |
957 | int baud; | 957 | int baud; |
958 | int new_parity = 0, new_parity_enable = 0, new_stop = 0, new_data = 8; | 958 | int new_parity = 0, new_parity_enable = 0, new_stop = 0, new_data = 8; |
959 | struct uart_info *info = the_port->info; | 959 | struct uart_state *state = the_port->state; |
960 | 960 | ||
961 | cflag = new_termios->c_cflag; | 961 | cflag = new_termios->c_cflag; |
962 | 962 | ||
@@ -997,14 +997,14 @@ ioc3_change_speed(struct uart_port *the_port, | |||
997 | 997 | ||
998 | the_port->ignore_status_mask = N_ALL_INPUT; | 998 | the_port->ignore_status_mask = N_ALL_INPUT; |
999 | 999 | ||
1000 | info->port.tty->low_latency = 1; | 1000 | state->port.tty->low_latency = 1; |
1001 | 1001 | ||
1002 | if (I_IGNPAR(info->port.tty)) | 1002 | if (I_IGNPAR(state->port.tty)) |
1003 | the_port->ignore_status_mask &= ~(N_PARITY_ERROR | 1003 | the_port->ignore_status_mask &= ~(N_PARITY_ERROR |
1004 | | N_FRAMING_ERROR); | 1004 | | N_FRAMING_ERROR); |
1005 | if (I_IGNBRK(info->port.tty)) { | 1005 | if (I_IGNBRK(state->port.tty)) { |
1006 | the_port->ignore_status_mask &= ~N_BREAK; | 1006 | the_port->ignore_status_mask &= ~N_BREAK; |
1007 | if (I_IGNPAR(info->port.tty)) | 1007 | if (I_IGNPAR(state->port.tty)) |
1008 | the_port->ignore_status_mask &= ~N_OVERRUN_ERROR; | 1008 | the_port->ignore_status_mask &= ~N_OVERRUN_ERROR; |
1009 | } | 1009 | } |
1010 | if (!(cflag & CREAD)) { | 1010 | if (!(cflag & CREAD)) { |
@@ -1286,7 +1286,7 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len) | |||
1286 | uart_handle_dcd_change | 1286 | uart_handle_dcd_change |
1287 | (port->ip_port, 0); | 1287 | (port->ip_port, 0); |
1288 | wake_up_interruptible | 1288 | wake_up_interruptible |
1289 | (&the_port->info-> | 1289 | (&the_port->state-> |
1290 | delta_msr_wait); | 1290 | delta_msr_wait); |
1291 | } | 1291 | } |
1292 | 1292 | ||
@@ -1392,21 +1392,21 @@ static int receive_chars(struct uart_port *the_port) | |||
1392 | struct tty_struct *tty; | 1392 | struct tty_struct *tty; |
1393 | unsigned char ch[MAX_CHARS]; | 1393 | unsigned char ch[MAX_CHARS]; |
1394 | int read_count = 0, read_room, flip = 0; | 1394 | int read_count = 0, read_room, flip = 0; |
1395 | struct uart_info *info = the_port->info; | 1395 | struct uart_state *state = the_port->state; |
1396 | struct ioc3_port *port = get_ioc3_port(the_port); | 1396 | struct ioc3_port *port = get_ioc3_port(the_port); |
1397 | unsigned long pflags; | 1397 | unsigned long pflags; |
1398 | 1398 | ||
1399 | /* Make sure all the pointers are "good" ones */ | 1399 | /* Make sure all the pointers are "good" ones */ |
1400 | if (!info) | 1400 | if (!state) |
1401 | return 0; | 1401 | return 0; |
1402 | if (!info->port.tty) | 1402 | if (!state->port.tty) |
1403 | return 0; | 1403 | return 0; |
1404 | 1404 | ||
1405 | if (!(port->ip_flags & INPUT_ENABLE)) | 1405 | if (!(port->ip_flags & INPUT_ENABLE)) |
1406 | return 0; | 1406 | return 0; |
1407 | 1407 | ||
1408 | spin_lock_irqsave(&the_port->lock, pflags); | 1408 | spin_lock_irqsave(&the_port->lock, pflags); |
1409 | tty = info->port.tty; | 1409 | tty = state->port.tty; |
1410 | 1410 | ||
1411 | read_count = do_read(the_port, ch, MAX_CHARS); | 1411 | read_count = do_read(the_port, ch, MAX_CHARS); |
1412 | if (read_count > 0) { | 1412 | if (read_count > 0) { |
@@ -1491,7 +1491,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is, | |||
1491 | uart_handle_dcd_change(the_port, | 1491 | uart_handle_dcd_change(the_port, |
1492 | shadow & SHADOW_DCD); | 1492 | shadow & SHADOW_DCD); |
1493 | wake_up_interruptible | 1493 | wake_up_interruptible |
1494 | (&the_port->info->delta_msr_wait); | 1494 | (&the_port->state->delta_msr_wait); |
1495 | } else if ((port->ip_notify & N_DDCD) | 1495 | } else if ((port->ip_notify & N_DDCD) |
1496 | && !(shadow & SHADOW_DCD)) { | 1496 | && !(shadow & SHADOW_DCD)) { |
1497 | /* Flag delta DCD/no DCD */ | 1497 | /* Flag delta DCD/no DCD */ |
@@ -1511,7 +1511,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is, | |||
1511 | uart_handle_cts_change(the_port, shadow | 1511 | uart_handle_cts_change(the_port, shadow |
1512 | & SHADOW_CTS); | 1512 | & SHADOW_CTS); |
1513 | wake_up_interruptible | 1513 | wake_up_interruptible |
1514 | (&the_port->info->delta_msr_wait); | 1514 | (&the_port->state->delta_msr_wait); |
1515 | } | 1515 | } |
1516 | } | 1516 | } |
1517 | 1517 | ||
@@ -1721,14 +1721,14 @@ static void ic3_shutdown(struct uart_port *the_port) | |||
1721 | { | 1721 | { |
1722 | unsigned long port_flags; | 1722 | unsigned long port_flags; |
1723 | struct ioc3_port *port; | 1723 | struct ioc3_port *port; |
1724 | struct uart_info *info; | 1724 | struct uart_state *state; |
1725 | 1725 | ||
1726 | port = get_ioc3_port(the_port); | 1726 | port = get_ioc3_port(the_port); |
1727 | if (!port) | 1727 | if (!port) |
1728 | return; | 1728 | return; |
1729 | 1729 | ||
1730 | info = the_port->info; | 1730 | state = the_port->state; |
1731 | wake_up_interruptible(&info->delta_msr_wait); | 1731 | wake_up_interruptible(&state->delta_msr_wait); |
1732 | 1732 | ||
1733 | spin_lock_irqsave(&the_port->lock, port_flags); | 1733 | spin_lock_irqsave(&the_port->lock, port_flags); |
1734 | set_notification(port, N_ALL, 0); | 1734 | set_notification(port, N_ALL, 0); |