[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 2/4] apic: convert ->busdev.qdev casts to DEVICE(
From: |
Zhu Guihua |
Subject: |
[Qemu-devel] [PATCH v4 2/4] apic: convert ->busdev.qdev casts to DEVICE() casts |
Date: |
Thu, 16 Apr 2015 11:16:17 +0800 |
Use DEVICE() casts to avoid accessing ICCDevice's qdev field
directly.
Signed-off-by: Zhu Guihua <address@hidden>
---
hw/intc/apic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index 0f97b47..00ae0ec 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -376,7 +376,7 @@ static void apic_update_irq(APICCommonState *s)
cpu_interrupt(cpu, CPU_INTERRUPT_POLL);
} else if (apic_irq_pending(s) > 0) {
cpu_interrupt(cpu, CPU_INTERRUPT_HARD);
- } else if (!apic_accept_pic_intr(&s->busdev.qdev) ||
!pic_get_output(isa_pic)) {
+ } else if (!apic_accept_pic_intr(DEVICE(s)) || !pic_get_output(isa_pic)) {
cpu_reset_interrupt(cpu, CPU_INTERRUPT_HARD);
}
}
@@ -549,10 +549,10 @@ static void apic_deliver(DeviceState *dev, uint8_t dest,
uint8_t dest_mode,
static bool apic_check_pic(APICCommonState *s)
{
- if (!apic_accept_pic_intr(&s->busdev.qdev) || !pic_get_output(isa_pic)) {
+ if (!apic_accept_pic_intr(DEVICE(s)) || !pic_get_output(isa_pic)) {
return false;
}
- apic_deliver_pic_intr(&s->busdev.qdev, 1);
+ apic_deliver_pic_intr(DEVICE(s), 1);
return true;
}
--
1.9.3