summaryrefslogtreecommitdiffstats
path: root/hw/ppc/mac_newworld.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-23 23:04:04 +0000
committerAlexander Graf <agraf@suse.de>2013-01-25 22:02:55 +0100
commit2e4a7c9c5df442d4223e738f7e8f73192b8b2a65 (patch)
tree64acdef5b26a80c151eeb3ac885719ed144da9b0 /hw/ppc/mac_newworld.c
parent84ede329083b649c54f078276e7e06d48e910b9d (diff)
downloadhqemu-2e4a7c9c5df442d4223e738f7e8f73192b8b2a65.zip
hqemu-2e4a7c9c5df442d4223e738f7e8f73192b8b2a65.tar.gz
adb: QOM'ify ADB devices
They were not qdev'ified before. Derive ADBDevice from DeviceState and convert reset callbacks to DeviceClass::reset, ADBDevice::opaque pointer to ADBDevice subtypes for mouse and keyboard and adb_{kbd,mouse}_init() to regular qdev functions. Fixing Coding Style issues and splitting keyboard and mouse off into their own files is left for a later point in time. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/mac_newworld.c')
-rw-r--r--hw/ppc/mac_newworld.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index b9c58c1..2892b36 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -381,8 +381,10 @@ static void ppc_core99_init(QEMUMachineInitArgs *args)
"ide[1]"));
macio_ide_init_drives(macio_ide, &hd[MAX_IDE_DEVS]);
- adb_kbd_init(&adb_bus);
- adb_mouse_init(&adb_bus);
+ dev = qdev_create(BUS(&adb_bus), TYPE_ADB_KEYBOARD);
+ qdev_init_nofail(dev);
+ dev = qdev_create(BUS(&adb_bus), TYPE_ADB_MOUSE);
+ qdev_init_nofail(dev);
if (usb_enabled(machine_arch == ARCH_MAC99_U3)) {
pci_create_simple(pci_bus, -1, "pci-ohci");
OpenPOWER on IntegriCloud