From 094b287f0b3b79d1e68df8f3a63cb144ec9cdfb6 Mon Sep 17 00:00:00 2001 From: "zhlcindy@gmail.com" Date: Sun, 2 Sep 2012 19:25:28 +0000 Subject: Add USB option in machine options When -usb option is used, global varible usb_enabled is set. And all the plaform will create one USB controller according to this variable. In fact, global varibles make code hard to read. So this patch is to remove global variable usb_enabled and add USB option in machine options. All the plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by: Li Zhang Acked-by: Alexander Graf Signed-off-by: Alexander Graf --- hw/pc_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/pc_piix.c') diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 47ebc1a..c7dd75b 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -267,7 +267,7 @@ static void pc_init1(MemoryRegion *system_memory, pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device, floppy, idebus[0], idebus[1], rtc_state); - if (pci_enabled && usb_enabled) { + if (pci_enabled && usb_enabled(false)) { pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci"); } -- cgit v1.1