diff options
Diffstat (limited to 'drivers/tty/ipwireless/tty.c')
-rw-r--r-- | drivers/tty/ipwireless/tty.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c index 2cde13ddf9fc..8fd72ff9436e 100644 --- a/drivers/tty/ipwireless/tty.c +++ b/drivers/tty/ipwireless/tty.c | |||
@@ -106,7 +106,7 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp) | |||
106 | 106 | ||
107 | tty->port.tty = linux_tty; | 107 | tty->port.tty = linux_tty; |
108 | linux_tty->driver_data = tty; | 108 | linux_tty->driver_data = tty; |
109 | linux_tty->low_latency = 1; | 109 | tty->port.low_latency = 1; |
110 | 110 | ||
111 | if (tty->tty_type == TTYTYPE_MODEM) | 111 | if (tty->tty_type == TTYTYPE_MODEM) |
112 | ipwireless_ppp_open(tty->network); | 112 | ipwireless_ppp_open(tty->network); |
@@ -160,15 +160,9 @@ static void ipw_close(struct tty_struct *linux_tty, struct file *filp) | |||
160 | void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data, | 160 | void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data, |
161 | unsigned int length) | 161 | unsigned int length) |
162 | { | 162 | { |
163 | struct tty_struct *linux_tty; | ||
164 | int work = 0; | 163 | int work = 0; |
165 | 164 | ||
166 | mutex_lock(&tty->ipw_tty_mutex); | 165 | mutex_lock(&tty->ipw_tty_mutex); |
167 | linux_tty = tty->port.tty; | ||
168 | if (linux_tty == NULL) { | ||
169 | mutex_unlock(&tty->ipw_tty_mutex); | ||
170 | return; | ||
171 | } | ||
172 | 166 | ||
173 | if (!tty->port.count) { | 167 | if (!tty->port.count) { |
174 | mutex_unlock(&tty->ipw_tty_mutex); | 168 | mutex_unlock(&tty->ipw_tty_mutex); |
@@ -176,7 +170,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data, | |||
176 | } | 170 | } |
177 | mutex_unlock(&tty->ipw_tty_mutex); | 171 | mutex_unlock(&tty->ipw_tty_mutex); |
178 | 172 | ||
179 | work = tty_insert_flip_string(linux_tty, data, length); | 173 | work = tty_insert_flip_string(&tty->port, data, length); |
180 | 174 | ||
181 | if (work != length) | 175 | if (work != length) |
182 | printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME | 176 | printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME |
@@ -187,7 +181,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data, | |||
187 | * This may sleep if ->low_latency is set | 181 | * This may sleep if ->low_latency is set |
188 | */ | 182 | */ |
189 | if (work) | 183 | if (work) |
190 | tty_flip_buffer_push(linux_tty); | 184 | tty_flip_buffer_push(&tty->port); |
191 | } | 185 | } |
192 | 186 | ||
193 | static void ipw_write_packet_sent_callback(void *callback_data, | 187 | static void ipw_write_packet_sent_callback(void *callback_data, |