Am Montag, 30. Oktober 2006 03:21 schrieb Alan Stern:
> On Sun, 29 Oct 2006, Oliver Neukum wrote:
> 
> > Am Sonntag, 29. Oktober 2006 16:21 schrieben Sie:
> > > If you're only going to disable autopm on open and enable on close then
> > > you could have used usb_autopm_get_interface() and
> > 
> > Upon further thought, I fail to see the need for these interfaces.
> > They do something that is simpler done within a driver.
> 
> Take a look at usb-skeleton.c to see how they can be used.  They are well
> suited to the drivers which present a simple character-device interface to
> userspace.

It seems to me that those drivers use:

if (desc->counter++) {
...
}

in open()

and

if (--desc->counter) {
...
}

in close()

But, this may be a matter of taste and viewpoint.
However, it seems to me that you cannot limit the API to only
the versions with counter and if push comes to shove the versions
without counters are more basic and hence must be supported.

        Regards
                Oliver

        

-------------------------------------------------------------------------
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