Re: [PATCH] usb-serial: Fix usb serial console open/close regression

From: Alan Stern
Date: Mon Mar 08 2010 - 15:02:16 EST


On Mon, 8 Mar 2010, Jason Wessel wrote:

> Alan, are you thinking about something like the patch one listed below?
>
> That led me to wonder if we additionally want to remove the ->console
> semi-private variable from the usb-serial port struct. I tested that
> and included a patch here as well as an RFC.
>
> If we come to agreement I'll send new patches with appropriate
> patch headers.

> ----- PART TWO STARTS HERE -----
>
> Remove the console variable from the usb serial private data.
>

> --- a/drivers/usb/serial/console.c
> +++ b/drivers/usb/serial/console.c
> @@ -180,7 +180,6 @@ static int usb_console_setup(struct cons
> --port->port.count;
> /* The console is special in terms of closing the device so
> * indicate this port is now acting as a system console. */
> - port->console = 1;
> set_bit(ASYNCB_CONSOLE, &port->port.flags);
>
> mutex_unlock(&serial->disc_mutex);
> @@ -217,7 +216,7 @@ static void usb_console_write(struct con
>
> dbg("%s - port %d, %d byte(s)", __func__, port->number, count);
>
> - if (!port->console) {
> + if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags)) {

Here and below you wrote INITIALIZED instead of CONSOLE.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/