Skip to content

Commit

Permalink
staging: octeon-usb: use a helper function to set the DMA mask
Browse files Browse the repository at this point in the history
Use a helper function to set the DMA mask.

Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
aakoskin authored and gregkh committed Dec 5, 2018
1 parent c38465d commit b5630e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/staging/octeon-usb/octeon-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include <linux/module.h>
#include <linux/usb/hcd.h>
#include <linux/prefetch.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>

#include <asm/octeon/octeon.h>
Expand Down Expand Up @@ -3606,8 +3607,9 @@ static int octeon_usb_probe(struct platform_device *pdev)
* Set the DMA mask to 64bits so we get buffers already translated for
* DMA.
*/
dev->coherent_dma_mask = ~0;
dev->dma_mask = &dev->coherent_dma_mask;
i = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
if (i)
return i;

/*
* Only cn52XX and cn56XX have DWC_OTG USB hardware and the
Expand Down

0 comments on commit b5630e3

Please sign in to comment.