diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2021-06-28 18:53:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-27 16:59:18 +0300 |
commit | c6e23b89a95db73bb85be28079664c66389323f0 (patch) | |
tree | 74d975aef25c8fa33acc01836c93c6a7efb3a761 /drivers/usb/dwc3 | |
parent | 6b587394c65c23d5ba05a33e5899e2ed8dab3c97 (diff) | |
download | linux-c6e23b89a95db73bb85be28079664c66389323f0.tar.xz |
usb: dwc3: gadget: set gadgets parent to the right controller
In case of dwc3 it is possible that the sysdev is the parent of the
controller. To ensure the right dev is set to the gadget's dev parent we
will hand over sysdev instead of dev, which will always point to the
controller.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20210628155311.16762-2-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index fb5a09ffebb0..a29a4ca833c1 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -4233,7 +4233,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) } - usb_initialize_gadget(dwc->dev, dwc->gadget, dwc_gadget_release); + usb_initialize_gadget(dwc->sysdev, dwc->gadget, dwc_gadget_release); dev = &dwc->gadget->dev; dev->platform_data = dwc; dwc->gadget->ops = &dwc3_gadget_ops; |