summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musbhsdma.c
diff options
context:
space:
mode:
authorAnand Gadiyar <gadiyar@ti.com>2010-07-08 11:04:55 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 21:35:39 (GMT)
commit8ca47c8a7621835914c053caaec74e66147dd7dc (patch)
tree21b329b59fcccdb77d4282e91584047ab0d3f42f /drivers/usb/musb/musbhsdma.c
parent3f1a9696aed6814601078f3c430a8e432b625c66 (diff)
downloadlinux-8ca47c8a7621835914c053caaec74e66147dd7dc.tar.xz
USB: musb: do not override DMA mode in channel program
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>
Diffstat (limited to 'drivers/usb/musb/musbhsdma.c')
-rw-r--r--drivers/usb/musb/musbhsdma.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index dc66e43..6dc107f 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -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;
}