diff mbox

[v2,4/4] arm11scu: Use qom_private to mark private fields

Message ID 1399650964-21067-5-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell May 9, 2014, 3:56 p.m. UTC
Mark the arm11scu private fields as qom_private.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/misc/arm11scu.c         |  2 ++
 include/hw/misc/arm11scu.h | 14 ++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/hw/misc/arm11scu.c b/hw/misc/arm11scu.c
index a791675..d8d5b2b 100644
--- a/hw/misc/arm11scu.c
+++ b/hw/misc/arm11scu.c
@@ -8,6 +8,8 @@ 
  * This code is licensed under the GPL.
  */
 
+#define IMPLEMENTING_ARM11_SCU
+
 #include "hw/misc/arm11scu.h"
 
 static uint64_t mpcore_scu_read(void *opaque, hwaddr offset,
diff --git a/include/hw/misc/arm11scu.h b/include/hw/misc/arm11scu.h
index 5ad0f3d..4de1eb1 100644
--- a/include/hw/misc/arm11scu.h
+++ b/include/hw/misc/arm11scu.h
@@ -16,14 +16,20 @@ 
 #define TYPE_ARM11_SCU "arm11-scu"
 #define ARM11_SCU(obj) OBJECT_CHECK(ARM11SCUState, (obj), TYPE_ARM11_SCU)
 
+#ifdef IMPLEMENTING_ARM11_SCU
+#define qom_private
+#else
+#define qom_private QEMU_PRIVATE_ATTR
+#endif
+
 typedef struct ARM11SCUState {
     /*< private >*/
-    SysBusDevice parent_obj;
+    qom_private SysBusDevice parent_obj;
     /*< public >*/
 
-    uint32_t control;
-    uint32_t num_cpu;
-    MemoryRegion iomem;
+    qom_private uint32_t control;
+    qom_private uint32_t num_cpu;
+    qom_private MemoryRegion iomem;
 } ARM11SCUState;
 
 #endif