Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325580
b: refs/heads/master
c: 042e6c2
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Jun 12, 2012
1 parent 81cf25b commit 353f3c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0e7865003ae9929f32bcb7277f591115fa242b7
refs/heads/master: 042e6c29c16c9c20c31110b611ed60187b0c873a
7 changes: 4 additions & 3 deletions trunk/arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ int line_open(struct line *lines, struct tty_struct *tty)
goto out_unlock;

err = 0;
if (line->count++)
if (line->port.count++)
goto out_unlock;

BUG_ON(tty->driver_data);
Expand Down Expand Up @@ -446,7 +446,7 @@ void line_close(struct tty_struct *tty, struct file * filp)
mutex_lock(&line->count_lock);
BUG_ON(!line->valid);

if (--line->count)
if (--line->port.count)
goto out_unlock;

line->tty = NULL;
Expand Down Expand Up @@ -478,7 +478,7 @@ int setup_one_line(struct line *lines, int n, char *init,

mutex_lock(&line->count_lock);

if (line->count) {
if (line->port.count) {
*error_out = "Device is already open";
goto out;
}
Expand Down Expand Up @@ -663,6 +663,7 @@ int register_lines(struct line_driver *line_driver,
driver->init_termios = tty_std_termios;

for (i = 0; i < nlines; i++) {
tty_port_init(&lines[i].port);
spin_lock_init(&lines[i].lock);
mutex_init(&lines[i].count_lock);
lines[i].driver = line_driver;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/drivers/line.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ struct line_driver {
};

struct line {
struct tty_port port;
struct tty_struct *tty;
struct mutex count_lock;
unsigned long count;
int valid;

char *init_str;
Expand Down

0 comments on commit 353f3c6

Please sign in to comment.