dma-contiguous: cleanup dma_alloc_contiguous
Split out a cma_alloc_aligned helper to deal with the "interesting" calling conventions for cma_alloc, which then allows to the main function to be written straight forward. This also takes advantage of the fact that NULL dev arguments have been gone from the DMA API for a while. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>
Showing
Please register or sign in to comment