Commit ddf47ccb authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: udc-core: remove protection when setting gadget.dev.release

now that no UDC driver touches gadget.dev.release
we can assign our release function to it without
being afraid of breaking anything.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 3920193d
...@@ -198,12 +198,10 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget, ...@@ -198,12 +198,10 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
gadget->dev.dma_parms = parent->dma_parms; gadget->dev.dma_parms = parent->dma_parms;
gadget->dev.dma_mask = parent->dma_mask; gadget->dev.dma_mask = parent->dma_mask;
if (release) { if (release)
gadget->dev.release = release; gadget->dev.release = release;
} else { else
if (!gadget->dev.release) gadget->dev.release = usb_udc_nop_release;
gadget->dev.release = usb_udc_nop_release;
}
ret = device_register(&gadget->dev); ret = device_register(&gadget->dev);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment