On Mon, 30 Oct 2006, Oliver Neukum wrote:

> Am Montag, 30. Oktober 2006 16:32 schrieb Alan Stern:
> > in its release() routine.  The driver doesn't need to maintain its own 
> > counter; that purpose is served by intf->pm_usage_cnt.
> 
> It doesn't need to maintain a counter for this purpose. My
> point is that the driver is likely to need to maintain a counter
> for other purposes. If this is the case, you have two counters
> and thence a chance that they get out of sync.

If the driver's author is worried about that chance, then he can use
usb_autpm_set_interface(), like you did in hid-core.  That will
effectively turn the pm_usage_cnt field into a flag rather than a counter.

I don't know what percentage of character-device drivers maintain their
own counters.  If it's a high percentage then you're right, and we can
eliminate the autopm_get and autopm_put routines.

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&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