mtd: nand: tango: Enforce DMA direction type
do_dma() uses an int to pass the DMA data direction information and pass the same value to dmaengine_prep_slave_sg(). Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV} definitions so it works fine, but assuming this will always be the case is not safe. Enforce enum dma_data_direction type in the function prototype and make the enum dma_data_direction -> enum dma_transfer_direction conversion explicit. Reported-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Showing
想要评论请 注册 或 登录