aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-09-08 07:07:26 -0400
committerRichard Weinberger <richard@nod.at>2012-03-24 19:29:54 -0400
commitee4850702bd6980c7baeb6a45142d55744a109a2 (patch)
treea0db87b08c0e2790a069f7e2891f798259d0c47e /arch/um
parentc8e2876fc8adaf9539f051fcda5d551308e8a0f8 (diff)
um: sorting out the chan mess, part 1
put references to in and out chans associated with line into explicit struct chan * fields in it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/chan_kern.c4
-rw-r--r--arch/um/drivers/line.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 3a95498155a1..390920d63a24 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -547,6 +547,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
547 char *in, *out; 547 char *in, *out;
548 548
549 if (!list_empty(chans)) { 549 if (!list_empty(chans)) {
550 line->chan_in = line->chan_out = NULL;
550 free_chan(chans); 551 free_chan(chans);
551 INIT_LIST_HEAD(chans); 552 INIT_LIST_HEAD(chans);
552 } 553 }
@@ -565,6 +566,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
565 566
566 new->input = 1; 567 new->input = 1;
567 list_add(&new->list, chans); 568 list_add(&new->list, chans);
569 line->chan_in = new;
568 570
569 new = parse_chan(line, out, device, opts, error_out); 571 new = parse_chan(line, out, device, opts, error_out);
570 if (new == NULL) 572 if (new == NULL)
@@ -572,6 +574,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
572 574
573 list_add(&new->list, chans); 575 list_add(&new->list, chans);
574 new->output = 1; 576 new->output = 1;
577 line->chan_out = new;
575 } 578 }
576 else { 579 else {
577 new = parse_chan(line, str, device, opts, error_out); 580 new = parse_chan(line, str, device, opts, error_out);
@@ -581,6 +584,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
581 list_add(&new->list, chans); 584 list_add(&new->list, chans);
582 new->input = 1; 585 new->input = 1;
583 new->output = 1; 586 new->output = 1;
587 line->chan_in = line->chan_out = new;
584 } 588 }
585 return 0; 589 return 0;
586} 590}
diff --git a/arch/um/drivers/line.h b/arch/um/drivers/line.h
index 95991994a93b..6cb05a22e9b0 100644
--- a/arch/um/drivers/line.h
+++ b/arch/um/drivers/line.h
@@ -39,6 +39,7 @@ struct line {
39 39
40 char *init_str; 40 char *init_str;
41 struct list_head chan_list; 41 struct list_head chan_list;
42 struct chan *chan_in, *chan_out;
42 43
43 /*This lock is actually, mostly, local to*/ 44 /*This lock is actually, mostly, local to*/
44 spinlock_t lock; 45 spinlock_t lock;