Re: [PATCH 4/5] usb_serial: Kill port mutex

From: Oliver Neukum
Date: Wed Oct 07 2009 - 01:02:36 EST


Am Dienstag, 6. Oktober 2009 17:06:46 schrieb Alan Cox:
> +++ b/drivers/usb/serial/opticon.c
> @@ -498,12 +498,12 @@ static int opticon_resume(struct usb_interface *intf)
> ÂÂÂÂÂÂÂÂstruct usb_serial_port *port = serial->port[0];
> ÂÂÂÂÂÂÂÂint result;
> Â
> -ÂÂÂÂÂÂÂmutex_lock(&port->mutex);
> +ÂÂÂÂÂÂÂmutex_lock(&port->port.mutex);
> ÂÂÂÂÂÂÂÂif (port->port.count)
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresult = usb_submit_urb(priv->bulk_read_urb, GFP_NOIO);
> ÂÂÂÂÂÂÂÂelse
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresult = 0;
> -ÂÂÂÂÂÂÂmutex_unlock(&port->mutex);
> +ÂÂÂÂÂÂÂmutex_unlock(&port->port.mutex);
> ÂÂÂÂÂÂÂÂreturn result;
> Â}

We will need some generic way to autoresume from open.
Resume will need to lock against open() and need to be called
from within open(). Any ideas for an unugly interface?

Regards
Oliver

èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—