]> git.proxmox.com Git - mirror_qemu.git/commitdiff
PPC: Don't use legacy -usbdevice support for setting up board
authorMarkus Armbruster <armbru@redhat.com>
Wed, 4 Feb 2015 12:28:14 +0000 (13:28 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 18 Feb 2015 09:53:10 +0000 (10:53 +0100)
It's tempting, because usbdevice_create() is so simple to use.  But
there's a lot of unwanted complexity behind the simple interface.
Switch to usb_create_simple().

Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/ppc/mac_newworld.c
hw/ppc/spapr.c

index c3770121e2abbe92e3af0e5758f4864f39bed017..624b4ab50bbba4c6d9c035c353e01fa5c6a8aa3b 100644 (file)
@@ -420,11 +420,14 @@ static void ppc_core99_init(MachineState *machine)
 
     if (machine->usb) {
         pci_create_simple(pci_bus, -1, "pci-ohci");
+
         /* U3 needs to use USB for input because Linux doesn't support via-cuda
         on PPC64 */
         if (machine_arch == ARCH_MAC99_U3) {
-            usbdevice_create("keyboard");
-            usbdevice_create("mouse");
+            USBBus *usb_bus = usb_bus_find(-1);
+
+            usb_create_simple(usb_bus, "usb-kbd");
+            usb_create_simple(usb_bus, "usb-mouse");
         }
     }
 
index 812d03054ddcf8dd5610841fc32bda4e5c548c77..a82a0f99b35d3ae14de5f52714ad453eb009db89 100644 (file)
@@ -1533,9 +1533,12 @@ static void ppc_spapr_init(MachineState *machine)
 
     if (machine->usb) {
         pci_create_simple(phb->bus, -1, "pci-ohci");
+
         if (spapr->has_graphics) {
-            usbdevice_create("keyboard");
-            usbdevice_create("mouse");
+            USBBus *usb_bus = usb_bus_find(-1);
+
+            usb_create_simple(usb_bus, "usb-kbd");
+            usb_create_simple(usb_bus, "usb-mouse");
         }
     }