Received: from eggs.gnu.org ([208.118.235.92]:40605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBWUp-0002Nu-Vi for qemu-devel@nongnu.org; Tue, 11 Sep 2012 15:51:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBWUm-0000gG-Tz for qemu-devel@nongnu.org; Tue, 11 Sep 2012 15:51:43 -0400 Received: from hall.aurel32.net ([88.191.126.93]:42680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBWUm-0000g4-MD for qemu-devel@nongnu.org; Tue, 11 Sep 2012 15:51:40 -0400 From: Aurelien Jarno Date: Tue, 11 Sep 2012 21:10:40 +0200 Message-Id: <1347390642-17434-16-git-send-email-aurelien@aurel32.net> In-Reply-To: <1347390642-17434-1-git-send-email-aurelien@aurel32.net> References: <1347390642-17434-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH v3 15/17] pc: use the new pci_vga_init() and isa_vga_init() functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Aurelien Jarno The CONFIG_SPICE is now tested in vl.c and thus not needed anymore. Cc: Anthony Liguori Signed-off-by: Aurelien Jarno --- hw/pc.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index e3d4631..562d288 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -27,7 +27,6 @@ #include "fdc.h" #include "ide.h" #include "pci.h" -#include "vmware_vga.h" #include "monitor.h" #include "fw_cfg.h" #include "hpet_emul.h" @@ -51,7 +50,6 @@ #include "exec-memory.h" #include "arch_init.h" #include "bitmap.h" -#include "vga-pci.h" /* output Bochs bios info messages */ //#define DEBUG_BIOS @@ -1019,34 +1017,13 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus) { DeviceState *dev = NULL; - if (cirrus_vga_enabled) { - if (pci_bus) { - dev = pci_cirrus_vga_init(pci_bus); - } else { - dev = &isa_create_simple(isa_bus, "isa-cirrus-vga")->qdev; - } - } else if (vmsvga_enabled) { - if (pci_bus) { - dev = pci_vmsvga_init(pci_bus); - } else { - fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__); - } -#ifdef CONFIG_SPICE - } else if (qxl_enabled) { - if (pci_bus) { - dev = &pci_create_simple(pci_bus, -1, "qxl-vga")->qdev; - } else { - fprintf(stderr, "%s: qxl: no PCI bus\n", __FUNCTION__); - } -#endif - } else if (std_vga_enabled) { - if (pci_bus) { - dev = pci_std_vga_init(pci_bus); - } else { - dev = isa_std_vga_init(isa_bus); - } + if (pci_bus) { + PCIDevice *pcidev = pci_vga_init(pci_bus); + dev = pcidev ? &pcidev->qdev : NULL; + } else if (isa_bus) { + ISADevice *isadev = isa_vga_init(isa_bus); + dev = isadev ? &isadev->qdev : NULL; } - return dev; } -- 1.7.10.4