diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-06-30 14:12:09 +0200 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-07-09 13:07:03 +0100 |
commit | 042f84d0af0e6c654d836f57ce916d7dec2b263d (patch) | |
tree | b7595a3d02e7c474a11d361278629f7c60fe7e49 /hw/qdev.h | |
parent | 10c4c98ab7dc18169b37b76f6ea5e60ebe65222b (diff) | |
download | qemu-042f84d0af0e6c654d836f57ce916d7dec2b263d.tar.gz qemu-042f84d0af0e6c654d836f57ce916d7dec2b263d.tar.bz2 qemu-042f84d0af0e6c654d836f57ce916d7dec2b263d.zip |
qdev: remove DeviceType
The only purpose DeviceType serves is creating a linked list of
DeviceInfo structs. This removes DeviceType and add a next field to
DeviceInfo instead, so the DeviceInfo structs can be changed that way.
Elimitates a pointless extra level of indirection.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r-- | hw/qdev.h | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -4,7 +4,7 @@ #include "hw.h" #include "sys-queue.h" -typedef struct DeviceType DeviceType; +typedef struct DeviceInfo DeviceInfo; typedef struct DeviceProperty DeviceProperty; @@ -15,7 +15,7 @@ typedef struct BusInfo BusInfo; /* This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures. */ struct DeviceState { - DeviceType *type; + DeviceInfo *info; BusState *parent_bus; DeviceProperty *props; int num_gpio_out; @@ -72,8 +72,6 @@ typedef struct { DevicePropType type; } DevicePropList; -typedef struct DeviceInfo DeviceInfo; - typedef void (*qdev_initfn)(DeviceState *dev, DeviceInfo *info); typedef void (*SCSIAttachFn)(DeviceState *host, BlockDriverState *bdrv, int unit); @@ -86,6 +84,7 @@ struct DeviceInfo { /* Private to qdev / bus. */ qdev_initfn init; BusInfo *bus_info; + struct DeviceInfo *next; }; void qdev_register(DeviceInfo *info); |