From d941fba0b5fa75604503aac9b3bcc2aa38b03cd0 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Tue, 6 Jan 2015 15:29:16 +0200 Subject: [PATCH] hw/ppc/spapr: simplify usb controller creation logic Signed-off-by: Marcel Apfelbaum Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Reviewed-by: Alexander Graf Message-id: 1420550957-22337-6-git-send-email-marcel@redhat.com Signed-off-by: Peter Maydell --- hw/ppc/spapr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 72c310267d..53c4116ed3 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1484,9 +1484,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"); -- 2.11.4.GIT