]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/tty/ipwireless/tty.c
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
[karo-tx-linux.git] / drivers / tty / ipwireless / tty.c
index 2cde13ddf9fc52196c1e4affca4292b7ba257a10..8fd72ff9436e12039abf43575d7cf17181132258 100644 (file)
@@ -106,7 +106,7 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp)
 
        tty->port.tty = linux_tty;
        linux_tty->driver_data = tty;
-       linux_tty->low_latency = 1;
+       tty->port.low_latency = 1;
 
        if (tty->tty_type == TTYTYPE_MODEM)
                ipwireless_ppp_open(tty->network);
@@ -160,15 +160,9 @@ static void ipw_close(struct tty_struct *linux_tty, struct file *filp)
 void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
                        unsigned int length)
 {
-       struct tty_struct *linux_tty;
        int work = 0;
 
        mutex_lock(&tty->ipw_tty_mutex);
-       linux_tty = tty->port.tty;
-       if (linux_tty == NULL) {
-               mutex_unlock(&tty->ipw_tty_mutex);
-               return;
-       }
 
        if (!tty->port.count) {
                mutex_unlock(&tty->ipw_tty_mutex);
@@ -176,7 +170,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
        }
        mutex_unlock(&tty->ipw_tty_mutex);
 
-       work = tty_insert_flip_string(linux_tty, data, length);
+       work = tty_insert_flip_string(&tty->port, data, length);
 
        if (work != length)
                printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME
@@ -187,7 +181,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
         * This may sleep if ->low_latency is set
         */
        if (work)
-               tty_flip_buffer_push(linux_tty);
+               tty_flip_buffer_push(&tty->port);
 }
 
 static void ipw_write_packet_sent_callback(void *callback_data,