usb: gadget: omap_udc: 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:53 +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/omap_udc.c

index 19420ad128ce3d907eefeb00a166cc07b1ebb39e..b8ed74a823cbb41c6f585fe422483905fc2567ea 100644 (file)
@@ -2628,7 +2628,6 @@ omap_udc_setup(struct platform_device *odev, struct usb_phy *xceiv)
        udc->gadget.speed = USB_SPEED_UNKNOWN;
        udc->gadget.max_speed = USB_SPEED_FULL;
        udc->gadget.name = driver_name;
-       udc->gadget.dev.release = omap_udc_release;
        udc->transceiver = xceiv;
 
        /* ep0 is special; put it right after the SETUP buffer */
@@ -2902,7 +2901,8 @@ bad_on_1710:
        }
 
        create_proc_file();
-       status = usb_add_gadget_udc(&pdev->dev, &udc->gadget);
+       status = usb_add_gadget_udc_release(&pdev->dev, &udc->gadget,
+                       omap_udc_release);
        if (status)
                goto cleanup4;