This value is now assigned during bind(). The configuration depends on
static values assigned by dummy driver itself. So there is no need to
defer this assigment until one know the actuall speed since the
configuration is static and known early.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dum->ep[0].ep.maxpacket = 64;
}
- if (dum->gadget.speed == USB_SPEED_SUPER)
- dum->gadget.is_otg =
- (dummy_hcd_to_hcd(dum->ss_hcd)->self.otg_port != 0);
- else
- dum->gadget.is_otg =
- (dummy_hcd_to_hcd(dum->hs_hcd)->self.otg_port != 0);
-
driver->driver.bus = NULL;
dum->driver = driver;
dum->gadget.dev.driver = &driver->driver;
dum->gadget.ep0 = &dum->ep[0].ep;
list_del_init(&dum->ep[0].ep.ep_list);
INIT_LIST_HEAD(&dum->fifo_req.queue);
+
+#ifdef CONFIG_USB_OTG
+ dum->gadget.is_otg = 1;
+#endif
}
static int dummy_udc_probe (struct platform_device *pdev)