linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] EDMA: TI: fixed wrongly initialized data parameter to the edma callback
@ 2015-03-23 20:35 Petr Kulhavy
  2015-03-24 10:07 ` Peter Ujfalusi
  2015-04-01  3:47 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Petr Kulhavy @ 2015-03-23 20:35 UTC (permalink / raw)
  To: vinod.koul
  Cc: dan.j.williams, dmaengine, linux-kernel, peter.ujfalusi,
	linux-omap, trivial, Petr Kulhavy

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>
---
 drivers/dma/edma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 1465610..4c8208b 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -813,7 +813,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;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-01  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-23 20:35 [PATCH 2/2] EDMA: TI: fixed wrongly initialized data parameter to the edma callback Petr Kulhavy
2015-03-24 10:07 ` Peter Ujfalusi
2015-04-01  3:47 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).