From 074f2fff798cb8f9588080b740dc356217a24720 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann <kraxel@redhat.com> Date: Wed, 10 Jun 2009 09:41:42 +0200 Subject: qdev: move name+size into DeviceInfo (v2) Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/qdev.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'hw/qdev.h') diff --git a/hw/qdev.h b/hw/qdev.h index 7291805..ad10499 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -78,12 +78,16 @@ typedef void (*SCSIAttachFn)(DeviceState *host, BlockDriverState *bdrv, int unit); struct DeviceInfo { + const char *name; + size_t size; + DevicePropList *props; + + /* Private to qdev / bus. */ qdev_initfn init; BusType bus_type; - DevicePropList *props; }; -void qdev_register(const char *name, int size, DeviceInfo *info); +void qdev_register(DeviceInfo *info); /* Register device properties. */ /* GPIO inputs also double as IRQ sinks. */ -- cgit v1.1