Skip to content

Commit

Permalink
USB: musb: do not override DMA mode in channel program
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anand Gadiyar authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 3f1a969 commit 8ca47c8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/usb/musb/musbhsdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8ca47c8

Please sign in to comment.