diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-01-03 09:53:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 01:30:15 -0500 |
commit | 2e124b4a390ca85325fae75764bef92f0547fa25 (patch) | |
tree | 5519fbcdbe954e79b271ea6d31ac5a4dc754c4f5 /drivers/char/pcmcia/synclink_cs.c | |
parent | d6c53c0e9bd0a83f9f9ddbc9fd80141a54d83896 (diff) |
TTY: switch tty_flip_buffer_push
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.
Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.
IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.
Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/pcmcia/synclink_cs.c')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 92dc7327c7aa..f334aec65fc7 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -886,7 +886,7 @@ static void rx_ready_hdlc(MGSLPC_INFO *info, int eom) | |||
886 | issue_command(info, CHA, CMD_RXFIFO); | 886 | issue_command(info, CHA, CMD_RXFIFO); |
887 | } | 887 | } |
888 | 888 | ||
889 | static void rx_ready_async(MGSLPC_INFO *info, int tcd, struct tty_struct *tty) | 889 | static void rx_ready_async(MGSLPC_INFO *info, int tcd) |
890 | { | 890 | { |
891 | struct tty_port *port = &info->port; | 891 | struct tty_port *port = &info->port; |
892 | unsigned char data, status, flag; | 892 | unsigned char data, status, flag; |
@@ -894,14 +894,6 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd, struct tty_struct *tty) | |||
894 | int work = 0; | 894 | int work = 0; |
895 | struct mgsl_icount *icount = &info->icount; | 895 | struct mgsl_icount *icount = &info->icount; |
896 | 896 | ||
897 | if (!tty) { | ||
898 | /* tty is not available anymore */ | ||
899 | issue_command(info, CHA, CMD_RXRESET); | ||
900 | if (debug_level >= DEBUG_LEVEL_ISR) | ||
901 | printk("%s(%d):rx_ready_async(tty=NULL)\n",__FILE__,__LINE__); | ||
902 | return; | ||
903 | } | ||
904 | |||
905 | if (tcd) { | 897 | if (tcd) { |
906 | /* early termination, get FIFO count from RBCL register */ | 898 | /* early termination, get FIFO count from RBCL register */ |
907 | fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f); | 899 | fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f); |
@@ -958,7 +950,7 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd, struct tty_struct *tty) | |||
958 | } | 950 | } |
959 | 951 | ||
960 | if (work) | 952 | if (work) |
961 | tty_flip_buffer_push(tty); | 953 | tty_flip_buffer_push(port); |
962 | } | 954 | } |
963 | 955 | ||
964 | 956 | ||
@@ -1218,7 +1210,7 @@ static irqreturn_t mgslpc_isr(int dummy, void *dev_id) | |||
1218 | if (info->params.mode == MGSL_MODE_HDLC) | 1210 | if (info->params.mode == MGSL_MODE_HDLC) |
1219 | rx_ready_hdlc(info, isr & IRQ_RXEOM); | 1211 | rx_ready_hdlc(info, isr & IRQ_RXEOM); |
1220 | else | 1212 | else |
1221 | rx_ready_async(info, isr & IRQ_RXEOM, tty); | 1213 | rx_ready_async(info, isr & IRQ_RXEOM); |
1222 | } | 1214 | } |
1223 | 1215 | ||
1224 | /* transmit IRQs */ | 1216 | /* transmit IRQs */ |