aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2012-06-04 15:58:39 -0400
committerRichard Weinberger <richard@nod.at>2012-07-28 11:47:59 -0400
commita84ccab132370a07c7ca0c6df8c96bbd16306c9a (patch)
tree34492732bdae70e16ac71945ada5bae1700f0bc3 /arch/um
parent79e0273d187c807dfec8d0cf450b8187cab5d3af (diff)
um: remove count_lock
this lock is no longer needed. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/line.c6
-rw-r--r--arch/um/drivers/line.h1
2 files changed, 0 insertions, 7 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 95d5e7803bc7..555ccfc7300c 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -382,8 +382,6 @@ int setup_one_line(struct line *lines, int n, char *init,
382 struct tty_driver *driver = line->driver->driver; 382 struct tty_driver *driver = line->driver->driver;
383 int err = -EINVAL; 383 int err = -EINVAL;
384 384
385 mutex_lock(&line->count_lock);
386
387 if (line->port.count) { 385 if (line->port.count) {
388 *error_out = "Device is already open"; 386 *error_out = "Device is already open";
389 goto out; 387 goto out;
@@ -425,7 +423,6 @@ int setup_one_line(struct line *lines, int n, char *init,
425 } 423 }
426 } 424 }
427out: 425out:
428 mutex_unlock(&line->count_lock);
429 return err; 426 return err;
430} 427}
431 428
@@ -513,7 +510,6 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
513 510
514 line = &lines[dev]; 511 line = &lines[dev];
515 512
516 mutex_lock(&line->count_lock);
517 if (!line->valid) 513 if (!line->valid)
518 CONFIG_CHUNK(str, size, n, "none", 1); 514 CONFIG_CHUNK(str, size, n, "none", 1);
519 else { 515 else {
@@ -525,7 +521,6 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
525 tty_kref_put(tty); 521 tty_kref_put(tty);
526 } 522 }
527 } 523 }
528 mutex_unlock(&line->count_lock);
529 524
530 return n; 525 return n;
531} 526}
@@ -578,7 +573,6 @@ int register_lines(struct line_driver *line_driver,
578 tty_port_init(&lines[i].port); 573 tty_port_init(&lines[i].port);
579 lines[i].port.ops = &line_port_ops; 574 lines[i].port.ops = &line_port_ops;
580 spin_lock_init(&lines[i].lock); 575 spin_lock_init(&lines[i].lock);
581 mutex_init(&lines[i].count_lock);
582 lines[i].driver = line_driver; 576 lines[i].driver = line_driver;
583 INIT_LIST_HEAD(&lines[i].chan_list); 577 INIT_LIST_HEAD(&lines[i].chan_list);
584 } 578 }
diff --git a/arch/um/drivers/line.h b/arch/um/drivers/line.h
index ad00f3e11ecc..bae95611e7ab 100644
--- a/arch/um/drivers/line.h
+++ b/arch/um/drivers/line.h
@@ -33,7 +33,6 @@ struct line_driver {
33 33
34struct line { 34struct line {
35 struct tty_port port; 35 struct tty_port port;
36 struct mutex count_lock;
37 int valid; 36 int valid;
38 37
39 char *init_str; 38 char *init_str;