Re: [patch]locking in idmouse

Laurent Pinchart <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Hi Olivier,

On Tuesday 23 October 2007 14:23, Oliver Neukum wrote:
> +++ work/drivers/usb/misc/idmouse.c	2007-10-23 14:13:52.000000000 +0200
> @@ -80,7 +81,7 @@ struct usb_idmouse {
>
>  	int open; /* if the port is open or not */
>  	int present; /* if the device is not disconnected */
> -	struct semaphore sem; /* locks this structure */
> +	struct mutex lock; /* locks this structure */
>
>  };

For what it's worth, I solved the same issue in the Linux UVC driver with a 
kref instead of a lock (keeping the global lock of course). Not sure which 
solution is better, but I thought it was worth mentioning it.

Best regards,

Laurent Pinchart

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.