Skip to content

Commit

Permalink
usb: gadget: udc-core: copy dma-related parameters from parent
Browse files Browse the repository at this point in the history
gadget's device pointer now is guaranteed to
have valid dma_mask, dma_parms and coherent_dma_mask
fields since we're always copying from our
parent device.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent ef222cb commit 658c8cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/gadget/udc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget)

dev_set_name(&gadget->dev, "gadget");

dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
gadget->dev.dma_parms = parent->dma_parms;
gadget->dev.dma_mask = parent->dma_mask;

ret = device_register(&gadget->dev);
if (ret)
goto err2;
Expand Down

0 comments on commit 658c8cf

Please sign in to comment.