usb: gadget: goku_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:49 +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/goku_udc.c

index aa1976ee34e0fe03c5e71a161a758bdd62b50a4d..991aba390d9d3e34fc967e3aeeda3e582a8eeaa3 100644 (file)
@@ -1749,7 +1749,6 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        dev->gadget.max_speed = USB_SPEED_FULL;
 
        /* the "gadget" abstracts/virtualizes the controller */
-       dev->gadget.dev.release = gadget_release;
        dev->gadget.name = driver_name;
 
        /* now all the pci goodies ... */
@@ -1800,7 +1799,8 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev);
 #endif
 
-       retval = usb_add_gadget_udc(&pdev->dev, &dev->gadget);
+       retval = usb_add_gadget_udc_release(&pdev->dev, &dev->gadget,
+                       gadget_release);
        if (retval)
                goto err;