vga: improve VGA logic

Improve VGA selection logic, push check for device availabilty to vl.c.
Create the devices at board level unconditionally.

Remove now unused pci_try_create*() functions.

Make PCI VGA devices optional.

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2011-09-27 19:15:42 +00:00
parent 0ae4699694
commit a369da5f31
12 changed files with 55 additions and 64 deletions

View file

@ -8,12 +8,8 @@ static inline DeviceState *pci_vmsvga_init(PCIBus *bus)
{
PCIDevice *dev;
dev = pci_try_create(bus, -1, "vmware-svga");
if (!dev || qdev_init(&dev->qdev) < 0) {
return NULL;
} else {
return &dev->qdev;
}
dev = pci_create_simple(bus, -1, "vmware-svga");
return &dev->qdev;
}
#endif