Commit 0e4d65e5 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: fsl_udc_core: don't assign gadget.dev.release directly

udc-core provides a better way to handle release
methods, let's use it.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 29e7dbf3
......@@ -2493,7 +2493,6 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
/* Setup gadget.dev and register with kernel */
dev_set_name(&udc_controller->gadget.dev, "gadget");
udc_controller->gadget.dev.release = fsl_udc_release;
udc_controller->gadget.dev.of_node = pdev->dev.of_node;
if (!IS_ERR_OR_NULL(udc_controller->transceiver))
......@@ -2530,7 +2529,8 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
goto err_free_irq;
}
ret = usb_add_gadget_udc(&pdev->dev, &udc_controller->gadget);
ret = usb_add_gadget_udc_release(&pdev->dev, &udc_controller->gadget,
fsl_udc_release);
if (ret)
goto err_del_udc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment