summary refs log tree commit diff stats
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-09 11:06:57 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-03 10:41:05 -0600
commit6e008585eb0a771e5011602e1bf2bf299b64457d (patch)
treeb732ab4e76493348cb3be62cd6e12b69e64d7820 /hw/qdev.h
parent4be9f0d11cf2dbb1eb3f55b33c87d6df3aa7d578 (diff)
downloadfocaccia-qemu-6e008585eb0a771e5011602e1bf2bf299b64457d.tar.gz
focaccia-qemu-6e008585eb0a771e5011602e1bf2bf299b64457d.zip
qdev: remove info from class
Now DeviceInfo is no longer used after object construction.  All of the
relevant members have been moved to DeviceClass.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 5476756003..b46d06e277 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -72,10 +72,30 @@ typedef struct DeviceProperty
 #define DEVICE_CLASS(klass) OBJECT_CLASS_CHECK(DeviceClass, (klass), TYPE_DEVICE)
 #define DEVICE_GET_CLASS(obj) OBJECT_GET_CLASS(DeviceClass, (obj), TYPE_DEVICE)
 
+typedef int (*qdev_initfn)(DeviceState *dev, DeviceInfo *info);
+typedef int (*qdev_event)(DeviceState *dev);
+typedef void (*qdev_resetfn)(DeviceState *dev);
+
 typedef struct DeviceClass {
     ObjectClass parent_class;
-    DeviceInfo *info;
+
+    const char *fw_name;
+    const char *alias;
+    const char *desc;
+    Property *props;
+    int no_user;
+
+    /* callbacks */
     void (*reset)(DeviceState *dev);
+
+    /* device state */
+    const VMStateDescription *vmsd;
+
+    /* Private to qdev / bus.  */
+    qdev_initfn init;
+    qdev_event unplug;
+    qdev_event exit;
+    BusInfo *bus_info;
 } DeviceClass;
 
 /* This structure should not be accessed directly.  We declare it here
@@ -213,10 +233,6 @@ BusState *qdev_get_child_bus(DeviceState *dev, const char *name);
 
 /*** Device API.  ***/
 
-typedef int (*qdev_initfn)(DeviceState *dev, DeviceInfo *info);
-typedef int (*qdev_event)(DeviceState *dev);
-typedef void (*qdev_resetfn)(DeviceState *dev);
-
 struct DeviceInfo {
     const char *name;
     const char *fw_name;