aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/generic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 69ecd3c92311..eff2010eb63f 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -47,6 +47,9 @@ int usb_choose_configuration(struct usb_device *udev)
47 int insufficient_power = 0; 47 int insufficient_power = 0;
48 struct usb_host_config *c, *best; 48 struct usb_host_config *c, *best;
49 49
50 if (usb_device_is_owned(udev))
51 return 0;
52
50 best = NULL; 53 best = NULL;
51 c = udev->config; 54 c = udev->config;
52 num_configs = udev->descriptor.bNumConfigurations; 55 num_configs = udev->descriptor.bNumConfigurations;
@@ -160,9 +163,7 @@ static int generic_probe(struct usb_device *udev)
160 /* Choose and set the configuration. This registers the interfaces 163 /* Choose and set the configuration. This registers the interfaces
161 * with the driver core and lets interface drivers bind to them. 164 * with the driver core and lets interface drivers bind to them.
162 */ 165 */
163 if (usb_device_is_owned(udev)) 166 if (udev->authorized == 0)
164 ; /* Don't configure if the device is owned */
165 else if (udev->authorized == 0)
166 dev_err(&udev->dev, "Device is not authorized for usage\n"); 167 dev_err(&udev->dev, "Device is not authorized for usage\n");
167 else { 168 else {
168 c = usb_choose_configuration(udev); 169 c = usb_choose_configuration(udev);