aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/line.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-09-08 10:49:34 -0400
committerRichard Weinberger <richard@nod.at>2012-03-24 19:29:54 -0400
commitbed5e39c56f3fe792e336cfa2670001d78f1d44c (patch)
tree3b1276d6c18de5a547657d7d86f3aa2f55fa2d1d /arch/um/drivers/line.c
parentee4850702bd6980c7baeb6a45142d55744a109a2 (diff)
um: switch users of ->chan_list to ->chan_{in,out} (easy cases)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers/line.c')
-rw-r--r--arch/um/drivers/line.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 9ffade87a8cf..c1aa89cefaec 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -21,7 +21,7 @@ static irqreturn_t line_interrupt(int irq, void *data)
21 struct line *line = chan->line; 21 struct line *line = chan->line;
22 22
23 if (line) 23 if (line)
24 chan_interrupt(&line->chan_list, &line->task, line->tty, irq); 24 chan_interrupt(line, &line->task, line->tty, irq);
25 return IRQ_HANDLED; 25 return IRQ_HANDLED;
26} 26}
27 27
@@ -30,7 +30,7 @@ static void line_timer_cb(struct work_struct *work)
30 struct line *line = container_of(work, struct line, task.work); 30 struct line *line = container_of(work, struct line, task.work);
31 31
32 if (!line->throttled) 32 if (!line->throttled)
33 chan_interrupt(&line->chan_list, &line->task, line->tty, 33 chan_interrupt(line, &line->task, line->tty,
34 line->driver->read_irq); 34 line->driver->read_irq);
35} 35}
36 36
@@ -145,7 +145,7 @@ static int flush_buffer(struct line *line)
145 /* line->buffer + LINE_BUFSIZE is the end of the buffer! */ 145 /* line->buffer + LINE_BUFSIZE is the end of the buffer! */
146 count = line->buffer + LINE_BUFSIZE - line->head; 146 count = line->buffer + LINE_BUFSIZE - line->head;
147 147
148 n = write_chan(&line->chan_list, line->head, count, 148 n = write_chan(line->chan_out, line->head, count,
149 line->driver->write_irq); 149 line->driver->write_irq);
150 if (n < 0) 150 if (n < 0)
151 return n; 151 return n;
@@ -162,7 +162,7 @@ static int flush_buffer(struct line *line)
162 } 162 }
163 163
164 count = line->tail - line->head; 164 count = line->tail - line->head;
165 n = write_chan(&line->chan_list, line->head, count, 165 n = write_chan(line->chan_out, line->head, count,
166 line->driver->write_irq); 166 line->driver->write_irq);
167 167
168 if (n < 0) 168 if (n < 0)
@@ -206,7 +206,7 @@ int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
206 if (line->head != line->tail) 206 if (line->head != line->tail)
207 ret = buffer_data(line, buf, len); 207 ret = buffer_data(line, buf, len);
208 else { 208 else {
209 n = write_chan(&line->chan_list, buf, len, 209 n = write_chan(line->chan_out, buf, len,
210 line->driver->write_irq); 210 line->driver->write_irq);
211 if (n < 0) { 211 if (n < 0) {
212 ret = n; 212 ret = n;
@@ -318,7 +318,7 @@ void line_throttle(struct tty_struct *tty)
318{ 318{
319 struct line *line = tty->driver_data; 319 struct line *line = tty->driver_data;
320 320
321 deactivate_chan(&line->chan_list, line->driver->read_irq); 321 deactivate_chan(line->chan_in, line->driver->read_irq);
322 line->throttled = 1; 322 line->throttled = 1;
323} 323}
324 324
@@ -327,7 +327,7 @@ void line_unthrottle(struct tty_struct *tty)
327 struct line *line = tty->driver_data; 327 struct line *line = tty->driver_data;
328 328
329 line->throttled = 0; 329 line->throttled = 0;
330 chan_interrupt(&line->chan_list, &line->task, tty, 330 chan_interrupt(line, &line->task, tty,
331 line->driver->read_irq); 331 line->driver->read_irq);
332 332
333 /* 333 /*
@@ -336,7 +336,7 @@ void line_unthrottle(struct tty_struct *tty)
336 * again and we shouldn't turn the interrupt back on. 336 * again and we shouldn't turn the interrupt back on.
337 */ 337 */
338 if (!line->throttled) 338 if (!line->throttled)
339 reactivate_chan(&line->chan_list, line->driver->read_irq); 339 reactivate_chan(line->chan_in, line->driver->read_irq);
340} 340}
341 341
342static irqreturn_t line_write_interrupt(int irq, void *data) 342static irqreturn_t line_write_interrupt(int irq, void *data)
@@ -428,11 +428,11 @@ int line_open(struct line *lines, struct tty_struct *tty)
428 INIT_DELAYED_WORK(&line->task, line_timer_cb); 428 INIT_DELAYED_WORK(&line->task, line_timer_cb);
429 429
430 if (!line->sigio) { 430 if (!line->sigio) {
431 chan_enable_winch(&line->chan_list, tty); 431 chan_enable_winch(line->chan_out, tty);
432 line->sigio = 1; 432 line->sigio = 1;
433 } 433 }
434 434
435 chan_window_size(&line->chan_list, &tty->winsize.ws_row, 435 chan_window_size(line, &tty->winsize.ws_row,
436 &tty->winsize.ws_col); 436 &tty->winsize.ws_col);
437out_unlock: 437out_unlock:
438 mutex_unlock(&line->count_lock); 438 mutex_unlock(&line->count_lock);
@@ -624,7 +624,7 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
624 CONFIG_CHUNK(str, size, n, "none", 1); 624 CONFIG_CHUNK(str, size, n, "none", 1);
625 else if (line->tty == NULL) 625 else if (line->tty == NULL)
626 CONFIG_CHUNK(str, size, n, line->init_str, 1); 626 CONFIG_CHUNK(str, size, n, line->init_str, 1);
627 else n = chan_config_string(&line->chan_list, str, size, error_out); 627 else n = chan_config_string(line, str, size, error_out);
628 mutex_unlock(&line->count_lock); 628 mutex_unlock(&line->count_lock);
629 629
630 return n; 630 return n;
@@ -761,7 +761,7 @@ static irqreturn_t winch_interrupt(int irq, void *data)
761 if (tty != NULL) { 761 if (tty != NULL) {
762 line = tty->driver_data; 762 line = tty->driver_data;
763 if (line != NULL) { 763 if (line != NULL) {
764 chan_window_size(&line->chan_list, &tty->winsize.ws_row, 764 chan_window_size(line, &tty->winsize.ws_row,
765 &tty->winsize.ws_col); 765 &tty->winsize.ws_col);
766 kill_pgrp(tty->pgrp, SIGWINCH, 1); 766 kill_pgrp(tty->pgrp, SIGWINCH, 1);
767 } 767 }