Let create both udcs 2.0 and 3.0. So if we have a 3.0 gadget it can passed to the 3.0 hcd and and 2.0 and the 2.0 hcd. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/usb/gadget/dummy_hcd.c | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 0ab2f56..c61d3f3 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -2317,18 +2317,16 @@ static int dummy_hcd_probe(struct platform_device *pdev) return retval; } - if (mod_data.is_super_speed) { - ss_hcd = usb_create_shared_hcd(&dummy_hcd, &pdev->dev, - dev_name(&pdev->dev), hs_hcd); - if (!ss_hcd) { - retval = -ENOMEM; - goto dealloc_usb2_hcd; - } - - retval = usb_add_hcd(ss_hcd, 0, 0); - if (retval) - goto put_usb3_hcd; + ss_hcd = usb_create_shared_hcd(&dummy_hcd, &pdev->dev, + dev_name(&pdev->dev), hs_hcd); + if (!ss_hcd) { + retval = -ENOMEM; + goto dealloc_usb2_hcd; } + + retval = usb_add_hcd(ss_hcd, 0, 0); + if (retval) + goto put_usb3_hcd; return 0; put_usb3_hcd: @@ -2432,8 +2430,7 @@ static int __init init (void) retval = platform_device_add(the_hcd_pdev); if (retval < 0) goto err_add_hcd; - if (!the_controller.hs_hcd || - (!the_controller.ss_hcd && mod_data.is_super_speed)) { + if (!the_controller.hs_hcd || !the_controller.ss_hcd) { /* * The hcd was added successfully but its probe function failed * for some reason. -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html