> Yes, if you don't like using the BKL (and I admit that it was a fun hack
> for me to use it), just have a static semaphore in your driver for all
> devices.

Using the BKL for new code is not recommanded, so I'll use a static 
driver-wide semaphore.

> Your only requirement is that it is outside of your local 
> device structure so that you can syncronize things.

Obviously :-) I suppose the reason why I need a semaphore and can't use a 
spinlock is that the call to kref_put in disconnect() must be protected by 
the lock, and the release() function called by kref_put might sleep. Is that 
right ? Is there another reason ?

> Hope this helps,

Yes it does, thanks.

Laurent Pinchart


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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