Will refuse to configure a non-authorized device. 

Signed-off-by: Inaky Perez-Gonzalez <[EMAIL PROTECTED]>

---
 drivers/usb/core/message.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux.hg/drivers/usb/core/message.c
===================================================================
--- linux.hg.orig/drivers/usb/core/message.c    2007-05-23 19:45:49.000000000 
-0700
+++ linux.hg/drivers/usb/core/message.c 2007-05-23 19:54:39.000000000 -0700
@@ -1343,6 +1343,9 @@
  * channels are available independently; and choosing between open
  * standard device protocols (like CDC) or proprietary ones.
  *
+ * Note that a non-authorized device (dev->authorized == 0) will only
+ * be put in unconfigured mode.
+ *
  * Note that USB has an additional level of device configurability,
  * associated with interfaces.  That configurability is accessed using
  * usb_set_interface().
@@ -1364,6 +1367,8 @@
        struct usb_interface **new_interfaces = NULL;
        int n, nintf;
 
+       if (dev->authorized == 0)
+               configuration = -1;
        if (configuration == -1)
                configuration = 0;
        else {

--

Inaky

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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