The patch titled usb serial console: add device function has been added to the -mm tree. Its filename is usb-serial-console-add-device-function.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: usb serial console: add device function From: Kevin Hao <kexin.hao@xxxxxxxxxxxxx> Add device funtion for usb serial console, so we can open /dev/console when we use a usb serial device as console. Signed-off-by: Kevin Hao <kexin.hao@xxxxxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/usb/serial/console.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff -puN drivers/usb/serial/console.c~usb-serial-console-add-device-function drivers/usb/serial/console.c --- a/drivers/usb/serial/console.c~usb-serial-console-add-device-function +++ a/drivers/usb/serial/console.c @@ -241,12 +241,25 @@ static void usb_console_write(struct con } } +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 (struct tty_driver *)(*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) _ Patches currently in -mm which might be from kexin.hao@xxxxxxxxxxxxx are usb-serial-console-setup-initialise-tty-kref.patch usb-serial-console-add-device-function.patch usb-serial-console-add-device-function-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html