mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
usb: gadget: net2272: don't assign gadget.dev.release directly
udc-core provides a better way to handle release methods, let's use it. Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
e861c768e5
commit
8efeeef61d
@ -2233,7 +2233,6 @@ static struct net2272 *net2272_probe_init(struct device *dev, unsigned int irq)
|
|||||||
ret->gadget.max_speed = USB_SPEED_HIGH;
|
ret->gadget.max_speed = USB_SPEED_HIGH;
|
||||||
|
|
||||||
/* the "gadget" abstracts/virtualizes the controller */
|
/* the "gadget" abstracts/virtualizes the controller */
|
||||||
ret->gadget.dev.release = net2272_gadget_release;
|
|
||||||
ret->gadget.name = driver_name;
|
ret->gadget.name = driver_name;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -2273,7 +2272,8 @@ net2272_probe_fin(struct net2272 *dev, unsigned int irqflags)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_irq;
|
goto err_irq;
|
||||||
|
|
||||||
ret = usb_add_gadget_udc(dev->dev, &dev->gadget);
|
ret = usb_add_gadget_udc_release(dev->dev, &dev->gadget,
|
||||||
|
net2272_gadget_release);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_add_udc;
|
goto err_add_udc;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user