Skip to content

Commit

Permalink
dmaengine: edma: fixed wrongly initialized data parameter to the edma…
Browse files Browse the repository at this point in the history
… callback

The "data" parameter passed indirectly to the edma_callback() should be
edma_chan and not the dma_chan.

This bug was so far harmless since the offset of struct dma_chan within struct
edma_chan is 0. However as soon as someone changes struct edma_chan this would
cause troubles.

Signed-off-by: Petr Kulhavy <petr@barix.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Petr Kulhavy authored and Vinod Koul committed Apr 1, 2015
1 parent de6b641 commit ab7add3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ static int edma_alloc_chan_resources(struct dma_chan *chan)
LIST_HEAD(descs);

a_ch_num = edma_alloc_channel(echan->ch_num, edma_callback,
chan, EVENTQ_DEFAULT);
echan, EVENTQ_DEFAULT);

if (a_ch_num < 0) {
ret = -ENODEV;
Expand Down

0 comments on commit ab7add3

Please sign in to comment.