From: Wendy Liang Date: Fri, 7 Jun 2013 03:05:38 +0000 (+1000) Subject: xilinx_axidma: Do not set DMA .notify to NULL after notify X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~900^2~59^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f3718c73bc13b8f3f2d1fe3421befd50ed3037e;p=sdk%2Femulator%2Fqemu.git xilinx_axidma: Do not set DMA .notify to NULL after notify If a stream notify function is not ready, it may re-populate the notify call- back to indicate it should be re-polled later. This break in this usage, as immediately following the notify() call, .notify is set to NULL. reverse the ordering of the notify call and NULL assignment accordingly. [PC: Reworked commit message] Signed-off-by: Wendy Liang Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias (cherry picked from commit 4f293bd6e53739e089f33b458f70a9c4ac136b92) Signed-off-by: Michael Roth --- diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 3a3ef8aff3..50054cf851 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -514,8 +514,9 @@ static void axidma_write(void *opaque, hwaddr addr, break; } if (sid == 1 && d->notify) { - d->notify(d->notify_opaque); + StreamCanPushNotifyFn notifytmp = d->notify; d->notify = NULL; + notifytmp(d->notify_opaque); } stream_update_irq(s); }