Skip to content

Commit

Permalink
hw/adc/zynq-xadc: Use qemu_irq typedef
Browse files Browse the repository at this point in the history
Except hw/core/irq.c which implements the forward-declared opaque
qemu_irq structure, hw/adc/zynq-xadc.{c,h} are the only files not
using the typedef. Fix this single exception.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Message-id: 20220509202035.50335-1-philippe.mathieu.daude@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
philmd authored and pm215 committed May 19, 2022
1 parent e1be11a commit 6e76d35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hw/adc/zynq-xadc.c
Expand Up @@ -86,7 +86,7 @@ static void zynq_xadc_update_ints(ZynqXADCState *s)
s->regs[INT_STS] |= INT_DFIFO_GTH;
}

qemu_set_irq(s->qemu_irq, !!(s->regs[INT_STS] & ~s->regs[INT_MASK]));
qemu_set_irq(s->irq, !!(s->regs[INT_STS] & ~s->regs[INT_MASK]));
}

static void zynq_xadc_reset(DeviceState *d)
Expand Down Expand Up @@ -262,7 +262,7 @@ static void zynq_xadc_init(Object *obj)
memory_region_init_io(&s->iomem, obj, &xadc_ops, s, "zynq-xadc",
ZYNQ_XADC_MMIO_SIZE);
sysbus_init_mmio(sbd, &s->iomem);
sysbus_init_irq(sbd, &s->qemu_irq);
sysbus_init_irq(sbd, &s->irq);
}

static const VMStateDescription vmstate_zynq_xadc = {
Expand Down
3 changes: 1 addition & 2 deletions include/hw/adc/zynq-xadc.h
Expand Up @@ -39,8 +39,7 @@ struct ZynqXADCState {
uint16_t xadc_dfifo[ZYNQ_XADC_FIFO_DEPTH];
uint16_t xadc_dfifo_entries;

struct IRQState *qemu_irq;

qemu_irq irq;
};

#endif /* ZYNQ_XADC_H */

0 comments on commit 6e76d35

Please sign in to comment.