Commit 96d7ddde19cd9617e377f30dbc23665c3ec03c78
1 parent
678fdca8
etrax: Don't keep the passed irq pointer.
Copy passed irq object at channel connect. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Showing
1 changed file
with
3 additions
and
3 deletions
hw/etraxfs_dma.c
@@ -165,7 +165,7 @@ enum dma_ch_state | @@ -165,7 +165,7 @@ enum dma_ch_state | ||
165 | 165 | ||
166 | struct fs_dma_channel | 166 | struct fs_dma_channel |
167 | { | 167 | { |
168 | - qemu_irq *irq; | 168 | + qemu_irq irq; |
169 | struct etraxfs_dma_client *client; | 169 | struct etraxfs_dma_client *client; |
170 | 170 | ||
171 | /* Internal status. */ | 171 | /* Internal status. */ |
@@ -392,7 +392,7 @@ static void channel_update_irq(struct fs_dma_ctrl *ctrl, int c) | @@ -392,7 +392,7 @@ static void channel_update_irq(struct fs_dma_ctrl *ctrl, int c) | ||
392 | c, | 392 | c, |
393 | ctrl->channels[c].regs[R_MASKED_INTR])); | 393 | ctrl->channels[c].regs[R_MASKED_INTR])); |
394 | 394 | ||
395 | - qemu_set_irq(ctrl->channels[c].irq[0], | 395 | + qemu_set_irq(ctrl->channels[c].irq, |
396 | !!ctrl->channels[c].regs[R_MASKED_INTR]); | 396 | !!ctrl->channels[c].regs[R_MASKED_INTR]); |
397 | } | 397 | } |
398 | 398 | ||
@@ -716,7 +716,7 @@ int etraxfs_dmac_input(struct etraxfs_dma_client *client, | @@ -716,7 +716,7 @@ int etraxfs_dmac_input(struct etraxfs_dma_client *client, | ||
716 | void etraxfs_dmac_connect(void *opaque, int c, qemu_irq *line, int input) | 716 | void etraxfs_dmac_connect(void *opaque, int c, qemu_irq *line, int input) |
717 | { | 717 | { |
718 | struct fs_dma_ctrl *ctrl = opaque; | 718 | struct fs_dma_ctrl *ctrl = opaque; |
719 | - ctrl->channels[c].irq = line; | 719 | + ctrl->channels[c].irq = *line; |
720 | ctrl->channels[c].input = input; | 720 | ctrl->channels[c].input = input; |
721 | } | 721 | } |
722 | 722 |