hw/ppc: modified the condition for usb controllers to be created for some ppc machines
commitc760dbb9dc4dfceeb5d4ae07876b10da58d4c630
authorMarcel Apfelbaum <marcel@redhat.com>
Tue, 6 Jan 2015 13:29:12 +0000 (6 15:29 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 7 Jan 2015 15:16:28 +0000 (7 16:16 +0100)
tree8a33322d82a8fc6242993ba44a6dacbeae48ba3c
parent2f285bdd54bb2ff25a213b3b77e9bf46f4306320
hw/ppc: modified the condition for usb controllers to be created for some ppc machines

Some ppc machines create a default usb controller based on a 'machine condition'.
Until now the logic was: create the usb controller if:
 -  the usb option was supplied in cli and value is true or
 -  the usb option was absent and both set_defaults and the machine
    condition were true.

Modified the logic to:
Create the usb controller if:
 - the machine condition is true and defaults are enabled or
 - the usb option is supplied and true.

The main for this is to simplify the usb_enabled method.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/mac_newworld.c
hw/ppc/spapr.c
include/sysemu/sysemu.h
vl.c