From 4ee9ced979e68522ee38ea759e7630ac70f15fa8 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Tue, 6 Jan 2015 15:29:16 +0200 Subject: hw/ppc/spapr: simplify usb controller creation logic Signed-off-by: Marcel Apfelbaum Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Signed-off-by: Alexander Graf --- hw/ppc/spapr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/ppc') diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d2b8b12150..b560459e83 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -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"); -- cgit v1.2.3