static int generic_probe(struct usb_device *udev)
{
- struct usb_hcd *hcd = bus_to_hcd(udev->bus);
int err, c;
/* Choose and set the configuration. This registers the interfaces
; /* Don't configure if the device is owned */
else if (udev->authorized == 0)
dev_err(&udev->dev, "Device is not authorized for usage\n");
+#ifdef CONFIG_USB_OTG
else if (is_otg_testdev(udev)) {
+ struct usb_hcd *hcd = bus_to_hcd(udev->bus);
/* According to USB OTG2.0 Spec Test mode support 6.4.2,
* for A-device enumeration, set_configuration(1), and
hcd->otg_notify(udev, USB_OTG_TESTDEV_VBUSOFF);
else
hcd->otg_notify(udev, USB_OTG_TESTDEV);
-
- } else {
+ }
+#endif
+ else {
c = usb_choose_configuration(udev);
if (c >= 0) {
err = usb_set_configuration(udev, c);