On Thu, 2006-04-13 at 22:25 +0200, Guennadi Liakhovetski wrote:
> +void usb_serial_console_disconnect(struct usb_serial *serial)
> +{
> +     if (serial && serial->port && serial->port[0] && serial->port[0] == 
> usbcons_info.port) {
> +             usbcons_info.port->open_count--;
> +             usbcons_info.port = NULL;
> +     }
> +}

I think you need unregister_console(&usbcons);
on disconnect. If the device is reinstalled later,
the console is registered again in usb_serial_console_init().
Until it is unregistered, the console subsystem keeps trying
to write to an ejected usb console.

The check for disconnected state prevents the write call
from causing harm, but it is still making unnecessary calls.

--
Paul



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to