usb: gadget: mv_udc_core: don't assign gadget.dev.release directly
authorFelipe Balbi <balbi@ti.com>
Tue, 26 Feb 2013 13:15:27 +0000 (15:15 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:17:51 +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/mv_udc_core.c

index d1b243d7666957e88ee18615277097e4a07294b0..d278e8f512c0f9a6714ec7983a3eb0280610e250 100644 (file)
@@ -2265,7 +2265,6 @@ static int mv_udc_probe(struct platform_device *pdev)
        udc->gadget.max_speed = USB_SPEED_HIGH; /* support dual speed */
 
        /* the "gadget" abstracts/virtualizes the controller */
-       udc->gadget.dev.release = gadget_release;
        udc->gadget.name = driver_name;         /* gadget name */
 
        eps_init(udc);
@@ -2305,7 +2304,8 @@ static int mv_udc_probe(struct platform_device *pdev)
        else
                udc->vbus_active = 1;
 
-       retval = usb_add_gadget_udc(&pdev->dev, &udc->gadget);
+       retval = usb_add_gadget_udc_release(&pdev->dev, &udc->gadget,
+                       gadget_release);
        if (retval)
                goto err_create_workqueue;