diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-23 23:04:03 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-01-25 22:02:55 +0100 |
commit | 84ede329083b649c54f078276e7e06d48e910b9d (patch) | |
tree | 50995b149b5ab378f16170f8bc0f6567cc18d30a /hw/adb.c | |
parent | 45fa67fb68e73b395cd93ec97e45785944d4ee6a (diff) |
adb: QOM'ify Apple Desktop Bus
It was not a qbus before, turn it into a first-class bus and initialize
it properly from CUDA. Leave it a global variable as long as devices are
not QOM'ified yet.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/adb.c')
-rw-r--r-- | hw/adb.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -126,6 +126,12 @@ static ADBDevice *adb_register_device(ADBBusState *s, int devaddr, return d; } +static const TypeInfo adb_bus_type_info = { + .name = TYPE_ADB_BUS, + .parent = TYPE_BUS, + .instance_size = sizeof(ADBBusState), +}; + /***************************************************************/ /* Keyboard ADB device */ @@ -453,3 +459,11 @@ void adb_mouse_init(ADBBusState *bus) qemu_add_mouse_event_handler(adb_mouse_event, d, 0, "QEMU ADB Mouse"); vmstate_register(NULL, -1, &vmstate_adb_mouse, s); } + + +static void adb_register_types(void) +{ + type_register_static(&adb_bus_type_info); +} + +type_init(adb_register_types) |