Hi Dave, I don't much buy the code bloat argument. For me it's like this: these routines are called from device drivers.
case (1): these tests may prevent a device driver from screwing the USB subsystem/other drivers. In this case they should stay.
case (2): these tests only protect device drivers from themselves. In that case they are probably only making device driver bugs harder to spot, and they should go.
That is, some (1) tests _aren't_ code bloat, while some (2) are.
I think Alan did a good job of covering the basic points that semi-regular LKML discussions on this topic cover, and you seem to have removed some category (2) tests, so I'm content for now.
Revised patch below.
It reads well. Presumably you tested with usbfs and the ALSA sound driver? And I see you added "dev->serialize" to the list of locks that the claim/release calls must hold ... probably safer to do that, though I suspect that at least the release() requirement can vanish.
Also I'd revert the change to create the driverfs interface files after all the probes succeed; it already makes trouble with hotplug (and sometimes udev) to have delays before those files appear, and this lengthens the delays.
I'll give this a whirl; drivers/usb/class/{audio,cdc-acm}.c also need changes, but this is a good start.
- Dave
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel