diff options
Diffstat (limited to 'drivers/usb/core/config.c')
| -rw-r--r-- | drivers/usb/core/config.c | 13 | 
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index a6b2cabe793..1ab4df1de2d 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -3,7 +3,6 @@  #include <linux/usb/hcd.h>  #include <linux/usb/quirks.h>  #include <linux/module.h> -#include <linux/init.h>  #include <linux/slab.h>  #include <linux/device.h>  #include <asm/byteorder.h> @@ -11,7 +10,6 @@  #define USB_MAXALTSETTING		128	/* Hard limit */ -#define USB_MAXENDPOINTS		30	/* Hard limit */  #define USB_MAXCONFIG			8	/* Arbitrary limit */ @@ -651,10 +649,6 @@ void usb_destroy_configuration(struct usb_device *dev)   *   * hub-only!! ... and only in reset path, or usb_new_device()   * (used by real hubs and virtual root hubs) - * - * NOTE: if this is a WUSB device and is not authorized, we skip the - *       whole thing. A non-authorized USB device has no - *       configurations.   */  int usb_get_configuration(struct usb_device *dev)  { @@ -666,8 +660,6 @@ int usb_get_configuration(struct usb_device *dev)  	struct usb_config_descriptor *desc;  	cfgno = 0; -	if (dev->authorized == 0)	/* Not really an error */ -		goto out_not_authorized;  	result = -ENOMEM;  	if (ncfg > USB_MAXCONFIG) {  		dev_warn(ddev, "too many configurations: %d, " @@ -724,6 +716,10 @@ int usb_get_configuration(struct usb_device *dev)  			result = -ENOMEM;  			goto err;  		} + +		if (dev->quirks & USB_QUIRK_DELAY_INIT) +			msleep(100); +  		result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno,  		    bigbuffer, length);  		if (result < 0) { @@ -751,7 +747,6 @@ int usb_get_configuration(struct usb_device *dev)  err:  	kfree(desc); -out_not_authorized:  	dev->descriptor.bNumConfigurations = cfgno;  err2:  	if (result == -ENOMEM)  | 
