Skip to content

Commit 8ca47c8

Browse files
Anand Gadiyargregkh
authored andcommitted
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>
1 parent 3f1a969 commit 8ca47c8

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/usb/musb/musbhsdma.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,7 @@ static int dma_channel_program(struct dma_channel *channel,
173173
musb_channel->max_packet_sz = packet_sz;
174174
channel->status = MUSB_DMA_STATUS_BUSY;
175175

176-
if ((mode == 1) && (len >= packet_sz))
177-
configure_channel(channel, packet_sz, 1, dma_addr, len);
178-
else
179-
configure_channel(channel, packet_sz, 0, dma_addr, len);
176+
configure_channel(channel, packet_sz, mode, dma_addr, len);
180177

181178
return true;
182179
}

0 commit comments

Comments
 (0)