usb: gadget: pch_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/pch_udc.c

index 79cf2966f6341167f138df9433c9fbba7c1ba081..44aacf7192ab9ba427ff7c816604f48b4afa23ab 100644 (file)
@@ -3191,13 +3191,13 @@ static int pch_udc_probe(struct pci_dev *pdev,
        if (retval)
                goto finished;
 
-       dev->gadget.dev.release = gadget_release;
        dev->gadget.name = KBUILD_MODNAME;
        dev->gadget.max_speed = USB_SPEED_HIGH;
 
        /* Put the device in disconnected state till a driver is bound */
        pch_udc_set_disconnect(dev);
-       retval = usb_add_gadget_udc(&pdev->dev, &dev->gadget);
+       retval = usb_add_gadget_udc_release(&pdev->dev, &dev->gadget,
+                       gadget_release);
        if (retval)
                goto finished;
        return 0;