]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
USB: musb: do not override DMA mode in channel program
authorAnand Gadiyar <gadiyar@ti.com>
Thu, 8 Jul 2010 11:04:55 +0000 (16:34 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:39 +0000 (14:35 -0700)
There is no reason for the DMA channel program to override the
DMA mode passed down by its caller. Use the passed parameter
directly, and let the caller handle the decision on which mode
is to be used.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musbhsdma.c

index dc66e4376d4906a4454b90a393851cd72631aefa..6dc107f252455d1f9133a57a320bd40f285ba6ae 100644 (file)
@@ -173,10 +173,7 @@ static int dma_channel_program(struct dma_channel *channel,
        musb_channel->max_packet_sz = packet_sz;
        channel->status = MUSB_DMA_STATUS_BUSY;
 
-       if ((mode == 1) && (len >= packet_sz))
-               configure_channel(channel, packet_sz, 1, dma_addr, len);
-       else
-               configure_channel(channel, packet_sz, 0, dma_addr, len);
+       configure_channel(channel, packet_sz, mode, dma_addr, len);
 
        return true;
 }