Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125046
b: refs/heads/master
c: 39efd19
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Hao authored and Linus Torvalds committed Jan 2, 2009
1 parent 0d9a062 commit 08fd482
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 975a1a7d887048d4afc9201383e11b7af991866b
refs/heads/master: 39efd191d01b5f1efc3d604baf74233dc525e6a8
13 changes: 13 additions & 0 deletions trunk/drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,25 @@ static void usb_console_write(struct console *co,
}
}

static struct tty_driver *usb_console_device(struct console *co, int *index)
{
struct tty_driver **p = (struct tty_driver **)co->data;

if (!*p)
return NULL;

*index = co->index;
return *p;
}

static struct console usbcons = {
.name = "ttyUSB",
.write = usb_console_write,
.device = usb_console_device,
.setup = usb_console_setup,
.flags = CON_PRINTBUFFER,
.index = -1,
.data = &usb_serial_tty_driver,
};

void usb_serial_console_disconnect(struct usb_serial *serial)
Expand Down

0 comments on commit 08fd482

Please sign in to comment.