aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-01-06 03:18:52 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:45 -0500
commit88890b88742debb97006df264b653d18acdc80d0 (patch)
treef84377762bd7e69b5cdcab1ee7e4406295c898ce /arch/um
parent0834cc77af6a8a650f803d4a7c3c0f134b366f87 (diff)
[PATCH] uml: Remove unneeded structure field
This removes a structure field which turned out to be pointless, and references to it. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/chan_kern.c16
-rw-r--r--arch/um/drivers/line.c2
-rw-r--r--arch/um/include/chan_kern.h5
3 files changed, 9 insertions, 14 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 8b1262e9fb66..59c9b3f7c840 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -315,7 +315,7 @@ int console_open_chan(struct line *line, struct console *co,
315 return 0; 315 return 0;
316 316
317 if (0 != parse_chan_pair(line->init_str, &line->chan_list, 317 if (0 != parse_chan_pair(line->init_str, &line->chan_list,
318 line->init_pri, co->index, opts)) 318 co->index, opts))
319 return -1; 319 return -1;
320 if (0 != open_chan(&line->chan_list)) 320 if (0 != open_chan(&line->chan_list))
321 return -1; 321 return -1;
@@ -468,8 +468,7 @@ struct chan_type chan_table[] = {
468#endif 468#endif
469}; 469};
470 470
471static struct chan *parse_chan(char *str, int pri, int device, 471static struct chan *parse_chan(char *str, int device, struct chan_opts *opts)
472 struct chan_opts *opts)
473{ 472{
474 struct chan_type *entry; 473 struct chan_type *entry;
475 struct chan_ops *ops; 474 struct chan_ops *ops;
@@ -507,13 +506,12 @@ static struct chan *parse_chan(char *str, int pri, int device,
507 .output = 0, 506 .output = 0,
508 .opened = 0, 507 .opened = 0,
509 .fd = -1, 508 .fd = -1,
510 .pri = pri,
511 .ops = ops, 509 .ops = ops,
512 .data = data }); 510 .data = data });
513 return chan; 511 return chan;
514} 512}
515 513
516int parse_chan_pair(char *str, struct list_head *chans, int pri, int device, 514int parse_chan_pair(char *str, struct list_head *chans, int device,
517 struct chan_opts *opts) 515 struct chan_opts *opts)
518{ 516{
519 struct chan *new, *chan; 517 struct chan *new, *chan;
@@ -521,8 +519,6 @@ int parse_chan_pair(char *str, struct list_head *chans, int pri, int device,
521 519
522 if(!list_empty(chans)){ 520 if(!list_empty(chans)){
523 chan = list_entry(chans->next, struct chan, list); 521 chan = list_entry(chans->next, struct chan, list);
524 if(chan->pri >= pri)
525 return 0;
526 free_chan(chans); 522 free_chan(chans);
527 INIT_LIST_HEAD(chans); 523 INIT_LIST_HEAD(chans);
528 } 524 }
@@ -532,14 +528,14 @@ int parse_chan_pair(char *str, struct list_head *chans, int pri, int device,
532 in = str; 528 in = str;
533 *out = '\0'; 529 *out = '\0';
534 out++; 530 out++;
535 new = parse_chan(in, pri, device, opts); 531 new = parse_chan(in, device, opts);
536 if(new == NULL) 532 if(new == NULL)
537 return -1; 533 return -1;
538 534
539 new->input = 1; 535 new->input = 1;
540 list_add(&new->list, chans); 536 list_add(&new->list, chans);
541 537
542 new = parse_chan(out, pri, device, opts); 538 new = parse_chan(out, device, opts);
543 if(new == NULL) 539 if(new == NULL)
544 return -1; 540 return -1;
545 541
@@ -547,7 +543,7 @@ int parse_chan_pair(char *str, struct list_head *chans, int pri, int device,
547 new->output = 1; 543 new->output = 1;
548 } 544 }
549 else { 545 else {
550 new = parse_chan(str, pri, device, opts); 546 new = parse_chan(str, device, opts);
551 if(new == NULL) 547 if(new == NULL)
552 return -1; 548 return -1;
553 549
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 2ee00cbe8f9a..80ade224d740 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -438,7 +438,7 @@ int line_open(struct line *lines, struct tty_struct *tty,
438 } 438 }
439 if (list_empty(&line->chan_list)) { 439 if (list_empty(&line->chan_list)) {
440 err = parse_chan_pair(line->init_str, &line->chan_list, 440 err = parse_chan_pair(line->init_str, &line->chan_list,
441 line->init_pri, tty->index, opts); 441 tty->index, opts);
442 if(err) goto out; 442 if(err) goto out;
443 err = open_chan(&line->chan_list); 443 err = open_chan(&line->chan_list);
444 if(err) goto out; 444 if(err) goto out;
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h
index 9ac069107107..22bf3a73437c 100644
--- a/arch/um/include/chan_kern.h
+++ b/arch/um/include/chan_kern.h
@@ -20,15 +20,14 @@ struct chan {
20 unsigned int output:1; 20 unsigned int output:1;
21 unsigned int opened:1; 21 unsigned int opened:1;
22 int fd; 22 int fd;
23 enum chan_init_pri pri;
24 struct chan_ops *ops; 23 struct chan_ops *ops;
25 void *data; 24 void *data;
26}; 25};
27 26
28extern void chan_interrupt(struct list_head *chans, struct work_struct *task, 27extern void chan_interrupt(struct list_head *chans, struct work_struct *task,
29 struct tty_struct *tty, int irq); 28 struct tty_struct *tty, int irq);
30extern int parse_chan_pair(char *str, struct list_head *chans, int pri, 29extern int parse_chan_pair(char *str, struct list_head *chans, int device,
31 int device, struct chan_opts *opts); 30 struct chan_opts *opts);
32extern int open_chan(struct list_head *chans); 31extern int open_chan(struct list_head *chans);
33extern int write_chan(struct list_head *chans, const char *buf, int len, 32extern int write_chan(struct list_head *chans, const char *buf, int len,
34 int write_irq); 33 int write_irq);