Commit a84ccab1 authored by Richard Weinberger's avatar Richard Weinberger

um: remove count_lock

this lock is no longer needed.
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 79e0273d
...@@ -382,8 +382,6 @@ int setup_one_line(struct line *lines, int n, char *init, ...@@ -382,8 +382,6 @@ int setup_one_line(struct line *lines, int n, char *init,
struct tty_driver *driver = line->driver->driver; struct tty_driver *driver = line->driver->driver;
int err = -EINVAL; int err = -EINVAL;
mutex_lock(&line->count_lock);
if (line->port.count) { if (line->port.count) {
*error_out = "Device is already open"; *error_out = "Device is already open";
goto out; goto out;
...@@ -425,7 +423,6 @@ int setup_one_line(struct line *lines, int n, char *init, ...@@ -425,7 +423,6 @@ int setup_one_line(struct line *lines, int n, char *init,
} }
} }
out: out:
mutex_unlock(&line->count_lock);
return err; return err;
} }
...@@ -513,7 +510,6 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str, ...@@ -513,7 +510,6 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
line = &lines[dev]; line = &lines[dev];
mutex_lock(&line->count_lock);
if (!line->valid) if (!line->valid)
CONFIG_CHUNK(str, size, n, "none", 1); CONFIG_CHUNK(str, size, n, "none", 1);
else { else {
...@@ -525,7 +521,6 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str, ...@@ -525,7 +521,6 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
tty_kref_put(tty); tty_kref_put(tty);
} }
} }
mutex_unlock(&line->count_lock);
return n; return n;
} }
...@@ -578,7 +573,6 @@ int register_lines(struct line_driver *line_driver, ...@@ -578,7 +573,6 @@ int register_lines(struct line_driver *line_driver,
tty_port_init(&lines[i].port); tty_port_init(&lines[i].port);
lines[i].port.ops = &line_port_ops; lines[i].port.ops = &line_port_ops;
spin_lock_init(&lines[i].lock); spin_lock_init(&lines[i].lock);
mutex_init(&lines[i].count_lock);
lines[i].driver = line_driver; lines[i].driver = line_driver;
INIT_LIST_HEAD(&lines[i].chan_list); INIT_LIST_HEAD(&lines[i].chan_list);
} }
......
...@@ -33,7 +33,6 @@ struct line_driver { ...@@ -33,7 +33,6 @@ struct line_driver {
struct line { struct line {
struct tty_port port; struct tty_port port;
struct mutex count_lock;
int valid; int valid;
char *init_str; char *init_str;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment