usb: gadget: net2280: 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:52 +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/net2280.c

index 9e4f0a26108e1a5eb1c27fb173b9e2fcef99f334..e5f2ef184367880adfbc816eb9e37dcc2faccbe2 100644 (file)
@@ -2707,7 +2707,6 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
        dev->gadget.max_speed = USB_SPEED_HIGH;
 
        /* the "gadget" abstracts/virtualizes the controller */
-       dev->gadget.dev.release = gadget_release;
        dev->gadget.name = driver_name;
 
        /* now all the pci goodies ... */
@@ -2819,7 +2818,8 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
        retval = device_create_file (&pdev->dev, &dev_attr_registers);
        if (retval) goto done;
 
-       retval = usb_add_gadget_udc(&pdev->dev, &dev->gadget);
+       retval = usb_add_gadget_udc_release(&pdev->dev, &dev->gadget,
+                       gadget_release);
        if (retval)
                goto done;
        return 0;