qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH][RFC v2 1/7] hw/irq: move struct IRQState to irq.h


From: liguang
Subject: [Qemu-devel] [PATCH][RFC v2 1/7] hw/irq: move struct IRQState to irq.h
Date: Fri, 5 Apr 2013 12:28:05 +0800

define struct IRQState in irq.c bring in
a annoying result, if you want dereference of
IRQState's member like opaque outside of
irq.c, compiler will complain:
"error: dereferencing pointer to incomplete type"

Signed-off-by: liguang <address@hidden>
---
 hw/irq.c |    6 ------
 hw/irq.h |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/irq.c b/hw/irq.c
index 2078542..100890f 100644
--- a/hw/irq.c
+++ b/hw/irq.c
@@ -24,12 +24,6 @@
 #include "qemu-common.h"
 #include "hw/irq.h"
 
-struct IRQState {
-    qemu_irq_handler handler;
-    void *opaque;
-    int n;
-};
-
 void qemu_set_irq(qemu_irq irq, int level)
 {
     if (!irq)
diff --git a/hw/irq.h b/hw/irq.h
index 610e6b7..7ae152d 100644
--- a/hw/irq.h
+++ b/hw/irq.h
@@ -7,6 +7,12 @@ typedef struct IRQState *qemu_irq;
 
 typedef void (*qemu_irq_handler)(void *opaque, int n, int level);
 
+struct IRQState {
+    qemu_irq_handler handler;
+    void *opaque;
+    int n;
+};
+
 void qemu_set_irq(qemu_irq irq, int level);
 
 static inline void qemu_irq_raise(qemu_irq irq)
-- 
1.7.2.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]