aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-01-06 15:29:16 +0200
committerAlexander Graf <agraf@suse.de>2015-01-07 16:16:29 +0100
commit4ee9ced979e68522ee38ea759e7630ac70f15fa8 (patch)
tree23414e0b47660cb2ee7a34dd59173804e882a594 /hw
parentb8cbc738de38f2a669de9920fc0b0ee14c1d2dd8 (diff)
downloadqemu-4ee9ced979e68522ee38ea759e7630ac70f15fa8.zip
qemu-4ee9ced979e68522ee38ea759e7630ac70f15fa8.tar.gz
qemu-4ee9ced979e68522ee38ea759e7630ac70f15fa8.tar.bz2
hw/ppc/spapr: simplify usb controller creation logic
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index d2b8b12..b560459 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");