dmaengine: timb_dma: fix the spare warinings
authorVinod Koul <vinod.koul@linux.intel.com>
Mon, 28 Nov 2011 03:21:16 +0000 (08:51 +0530)
committerVinod Koul <vinod.koul@linux.intel.com>
Mon, 28 Nov 2011 03:21:16 +0000 (08:51 +0530)
Sparse warns:

drivers/dma/timb_dma.c:168:17: warning: mixing different enum types
drivers/dma/timb_dma.c:168:17:     int enum dma_transfer_direction versus
drivers/dma/timb_dma.c:168:17:     int enum dma_data_direction
drivers/dma/timb_dma.c:172:32: warning: mixing different enum types
drivers/dma/timb_dma.c:172:32:     int enum dma_transfer_direction versus
drivers/dma/timb_dma.c:172:32:     int enum dma_data_direction

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/timb_dma.c

index 8c88072..d142ae1 100644 (file)
@@ -166,10 +166,10 @@ static void __td_unmap_desc(struct timb_dma_chan *td_chan, const u8 *dma_desc,
 
        if (single)
                dma_unmap_single(chan2dev(&td_chan->chan), addr, len,
-                       td_chan->direction);
+                       DMA_TO_DEVICE);
        else
                dma_unmap_page(chan2dev(&td_chan->chan), addr, len,
-                       td_chan->direction);
+                       DMA_TO_DEVICE);
 }
 
 static void __td_unmap_descs(struct timb_dma_desc *td_desc, bool single)
@@ -398,7 +398,7 @@ static struct timb_dma_desc *td_alloc_init_desc(struct timb_dma_chan *td_chan)
        td_desc->txd.flags = DMA_CTRL_ACK;
 
        td_desc->txd.phys = dma_map_single(chan2dmadev(chan),
-               td_desc->desc_list, td_desc->desc_list_len, DMA_MEM_TO_DEV);
+               td_desc->desc_list, td_desc->desc_list_len, DMA_TO_DEVICE);
 
        err = dma_mapping_error(chan2dmadev(chan), td_desc->txd.phys);
        if (err) {
@@ -419,7 +419,7 @@ static void td_free_desc(struct timb_dma_desc *td_desc)
 {
        dev_dbg(chan2dev(td_desc->txd.chan), "Freeing desc: %p\n", td_desc);
        dma_unmap_single(chan2dmadev(td_desc->txd.chan), td_desc->txd.phys,
-               td_desc->desc_list_len, DMA_MEM_TO_DEV);
+               td_desc->desc_list_len, DMA_TO_DEVICE);
 
        kfree(td_desc->desc_list);
        kfree(td_desc);