From 2e4a7c9c5df442d4223e738f7e8f73192b8b2a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 23 Jan 2013 23:04:04 +0000 Subject: adb: QOM'ify ADB devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Alexander Graf --- hw/ppc/mac_oldworld.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hw/ppc/mac_oldworld.c') diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 9d9212a37e..59b7199a92 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -281,8 +281,10 @@ static void ppc_heathrow_init(QEMUMachineInitArgs *args) hd[3] = hd[2] = NULL; pci_cmd646_ide_init(pci_bus, hd, 0); - 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(false)) { pci_create_simple(pci_bus, -1, "pci-ohci"); -- cgit v1.2.1