mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
usb: gadget: udc-core: initialize parent
if udc-core always does it, we can delete some extra lines from all UDC drivers. Besides, it avoids mistakes from happening and propagating. Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
658c8cf14d
commit
2ed14320f3
1 changed files with 1 additions and 0 deletions
|
@ -184,6 +184,7 @@ int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget)
|
||||||
goto err1;
|
goto err1;
|
||||||
|
|
||||||
dev_set_name(&gadget->dev, "gadget");
|
dev_set_name(&gadget->dev, "gadget");
|
||||||
|
gadget->dev.parent = parent;
|
||||||
|
|
||||||
dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
|
dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
|
||||||
gadget->dev.dma_parms = parent->dma_parms;
|
gadget->dev.dma_parms = parent->dma_parms;
|
||||||
|
|
Loading…
Reference in a new issue