usb: gadget: fsl_qe_udc: don't assign gadget.dev.release directly
authorFelipe Balbi <balbi@ti.com>
Tue, 26 Feb 2013 13:15:26 +0000 (15:15 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:17:47 +0000 (11:17 +0200)
udc-core provides a better way to handle release
methods, let's use it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/fsl_qe_udc.c

index 37feb62fa930ece4a885eb65cb680299c7bf3d4b..9a7ee3347e4d925e55645c2e0f1de7ef03ca312a 100644 (file)
@@ -2521,7 +2521,6 @@ static int qe_udc_probe(struct platform_device *ofdev)
 
        /* name: Identifies the controller hardware type. */
        udc->gadget.name = driver_name;
-       udc->gadget.dev.release = qe_udc_release;
        udc->gadget.dev.parent = &ofdev->dev;
 
        /* initialize qe_ep struct */
@@ -2585,7 +2584,8 @@ static int qe_udc_probe(struct platform_device *ofdev)
                goto err5;
        }
 
-       ret = usb_add_gadget_udc(&ofdev->dev, &udc->gadget);
+       ret = usb_add_gadget_udc_release(&ofdev->dev, &udc->gadget,
+                       qe_udc_release);
        if (ret)
                goto err6;