diff options
author | Felipe Balbi <balbi@ti.com> | 2013-02-26 10:50:42 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 11:17:17 +0200 |
commit | 658c8cf14dce1093e9f810f7e04a711ed79da6bd (patch) | |
tree | 465403b392659844f978bc0af6a39248dc466358 | |
parent | ef222cb5b575df57d8cd511965800519b90a6c31 (diff) |
usb: gadget: udc-core: copy dma-related parameters from parent
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>
-rw-r--r-- | drivers/usb/gadget/udc-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index 8a1eeb24ae6..3e19a016c19 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c @@ -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; |