From: Anand Gadiyar Date: Thu, 8 Jul 2010 11:04:55 +0000 (+0530) Subject: USB: musb: do not override DMA mode in channel program X-Git-Tag: v2.6.36-rc1~293^2~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ca47c8a7621835914c053caaec74e66147dd7dc;p=platform%2Fkernel%2Flinux-3.10.git 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 Acked-by: Felipe Balbi Signed-off-by: Ajay Kumar Gupta Signed-off-by: Greg Kroah-Hartman --- 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; }