diff options
author | Wendy Liang <jliang@xilinx.com> | 2013-06-07 13:05:38 +1000 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2013-06-10 13:04:40 +0200 |
commit | 4f293bd6e53739e089f33b458f70a9c4ac136b92 (patch) | |
tree | b5c4aa0e4f49a06a470990ef49f4d98726ed17f1 /hw/dma | |
parent | 4e298e46ddcbb3a2a653a582b54557b75180c625 (diff) |
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 <jliang@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw/dma')
-rw-r--r-- | hw/dma/xilinx_axidma.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |