]> xenbits.xensource.com Git - people/liuw/qemu.git/commitdiff
hw/ppc/spapr: simplify usb controller creation logic
authorMarcel Apfelbaum <marcel@redhat.com>
Tue, 6 Jan 2015 13:29:16 +0000 (15:29 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 7 Jan 2015 15:16:29 +0000 (16:16 +0100)
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr.c

index d2b8b1215085aae2b5129e865f1d9cd664f85935..b560459e833985511ae87f8893b0554a2115fd4c 100644 (file)
@@ -1528,9 +1528,10 @@ static void ppc_spapr_init(MachineState *machine)
     /* Graphics */
     if (spapr_vga_init(phb->bus)) {
         spapr->has_graphics = true;
+        machine->usb |= defaults_enabled();
     }
 
-    if ((spapr->has_graphics && defaults_enabled()) || usb_enabled()) {
+    if (machine->usb) {
         pci_create_simple(phb->bus, -1, "pci-ohci");
         if (spapr->has_graphics) {
             usbdevice_create("keyboard");