Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82205
b: refs/heads/master
c: 9a6b1ef
h: refs/heads/master
i:
  82203: dbd6eca
v: v3
  • Loading branch information
Aristeu Rozanski authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent 1ac007a commit 3916c4c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 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: 27680d232b04d434d8d49a8417429b9512ffb7c6
refs/heads/master: 9a6b1efa6fd1ee022fdf42c91a9868c589cc95b7
3 changes: 2 additions & 1 deletion trunk/drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ static int usb_console_setup(struct console *co, char *options)
kfree (termios);
kfree (tty);
}
port->console = 1;

return retval;
return 0;
}

static void usb_console_write(struct console *co, const char *buf, unsigned count)
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,21 @@ static void serial_close(struct tty_struct *tty, struct file * filp)
}

--port->open_count;
if (port->open_count == 0) {
if (port->open_count == 0)
/* only call the device specific close if this
* port is being closed by the last owner */
port->serial->type->close(port, filp);

if (port->open_count == (port->console? 1 : 0)) {
if (port->tty) {
if (port->tty->driver_data)
port->tty->driver_data = NULL;
port->tty = NULL;
}
}

if (port->open_count == 0)
module_put(port->serial->type->driver.owner);
}

mutex_unlock(&port->mutex);
usb_serial_put(port->serial);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/usb/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ struct usb_serial_port {
int open_count;
char throttled;
char throttle_req;
char console;
struct device dev;
};
#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
Expand Down

0 comments on commit 3916c4c

Please sign in to comment.