Skip to content

Commit

Permalink
usb: gadget: net2280: don't assign gadget.dev.release directly
Browse files Browse the repository at this point in the history
udc-core provides a better way to handle release
methods, let's use it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent 8efeeef commit 2901df6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/net2280.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ... */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2901df6

Please sign in to comment.