Skip to content

Commit

Permalink
usb: gadget: mv_udc_core: 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 7c9c3c7 commit e861c76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2265,7 +2265,6 @@ static int mv_udc_probe(struct platform_device *pdev)
udc->gadget.max_speed = USB_SPEED_HIGH; /* support dual speed */

/* the "gadget" abstracts/virtualizes the controller */
udc->gadget.dev.release = gadget_release;
udc->gadget.name = driver_name; /* gadget name */

eps_init(udc);
Expand Down Expand Up @@ -2305,7 +2304,8 @@ static int mv_udc_probe(struct platform_device *pdev)
else
udc->vbus_active = 1;

retval = usb_add_gadget_udc(&pdev->dev, &udc->gadget);
retval = usb_add_gadget_udc_release(&pdev->dev, &udc->gadget,
gadget_release);
if (retval)
goto err_create_workqueue;

Expand Down

0 comments on commit e861c76

Please sign in to comment.