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>
This commit is contained in:
Edgar E. Iglesias 2009-05-18 21:44:10 +02:00
parent 678fdca87a
commit 96d7ddde19

View File

@ -165,7 +165,7 @@ enum dma_ch_state
struct fs_dma_channel
{
qemu_irq *irq;
qemu_irq irq;
struct etraxfs_dma_client *client;
/* Internal status. */
@ -392,7 +392,7 @@ static void channel_update_irq(struct fs_dma_ctrl *ctrl, int c)
c,
ctrl->channels[c].regs[R_MASKED_INTR]));
qemu_set_irq(ctrl->channels[c].irq[0],
qemu_set_irq(ctrl->channels[c].irq,
!!ctrl->channels[c].regs[R_MASKED_INTR]);
}
@ -716,7 +716,7 @@ int etraxfs_dmac_input(struct etraxfs_dma_client *client,
void etraxfs_dmac_connect(void *opaque, int c, qemu_irq *line, int input)
{
struct fs_dma_ctrl *ctrl = opaque;
ctrl->channels[c].irq = line;
ctrl->channels[c].irq = *line;
ctrl->channels[c].input = input;
}