ChangeSet 1.1371.759.19, 2004/04/23 16:20:26-07:00, [EMAIL PROTECTED]

[PATCH] USB usbfs: drop pointless racy check

The check of interface->dev.driver requires a lock to be taken
to protect against driver binding changes.  But in fact I think it
is better just to drop the test.  The result is that the caller is
required to claim an interface before changing the altsetting,
which is consistent with the other routines that operate on
interfaces.

 devio.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)


 drivers/usb/core/devio.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)


diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c  Fri May 14 15:33:20 2004
+++ b/drivers/usb/core/devio.c  Fri May 14 15:33:20 2004
@@ -747,10 +747,8 @@
        if ((ret = findintfif(ps->dev, setintf.interface)) < 0)
                return ret;
        interface = ps->dev->actconfig->interface[ret];
-       if (interface->dev.driver) {
-               if ((ret = checkintf(ps, ret)))
-                       return ret;
-       }
+       if ((ret = checkintf(ps, ret)))
+               return ret;
        if (usb_set_interface(ps->dev, setintf.interface, setintf.altsetting))
                return -EINVAL;
        return 0;



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to