提交 c6e23b89 编写于 作者: M Michael Grzeschik 提交者: Greg Kroah-Hartman

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: NMichael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20210628155311.16762-2-m.grzeschik@pengutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6b587394
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册