forked from luck/tmp_suning_uos_patched
dma-direct: use phys_to_dma_direct in dma_direct_alloc
Replace the currently open code copy. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
This commit is contained in:
parent
3773dfe6ea
commit
96eb89caf7
|
@ -240,10 +240,7 @@ void *dma_direct_alloc(struct device *dev, size_t size,
|
|||
goto out_encrypt_pages;
|
||||
}
|
||||
done:
|
||||
if (force_dma_unencrypted(dev))
|
||||
*dma_handle = __phys_to_dma(dev, page_to_phys(page));
|
||||
else
|
||||
*dma_handle = phys_to_dma(dev, page_to_phys(page));
|
||||
*dma_handle = phys_to_dma_direct(dev, page_to_phys(page));
|
||||
return ret;
|
||||
|
||||
out_encrypt_pages:
|
||||
|
|
Loading…
Reference in New Issue
Block a user