OSDN Git Service

Rename pci_create_noinit() to pci_create()
authorMarkus Armbruster <armbru@redhat.com>
Fri, 25 Sep 2009 01:53:53 +0000 (03:53 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:53 +0000 (09:32 -0500)
It's qdev_create() specialized for PCI, so name it accordingly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/ide/pci.c
hw/pci-hotplug.c
hw/pci.c
hw/pci.h
hw/vga-pci.c

index bddf541..6d090bc 100644 (file)
@@ -443,7 +443,7 @@ void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
 {
     PCIDevice *dev;
 
-    dev = pci_create_noinit(bus, -1, "CMD646 IDE");
+    dev = pci_create(bus, -1, "CMD646 IDE");
     qdev_prop_set_uint32(&dev->qdev, "secondary", secondary_ide_enabled);
     qdev_init(&dev->qdev);
 
index d02f73c..f781386 100644 (file)
@@ -151,14 +151,14 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
 
     switch (type) {
     case IF_SCSI:
-        dev = pci_create_noinit(bus, devfn, "lsi53c895a");
+        dev = pci_create(bus, devfn, "lsi53c895a");
         break;
     case IF_VIRTIO:
         if (!dinfo) {
             monitor_printf(mon, "virtio requires a backing file/device.\n");
             return NULL;
         }
-        dev = pci_create_noinit(bus, devfn, "virtio-blk-pci");
+        dev = pci_create(bus, devfn, "virtio-blk-pci");
         qdev_prop_set_drive(&dev->qdev, "drive", dinfo);
         break;
     default:
index fd66d1f..ade778f 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -866,7 +866,7 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
         return NULL;
     }
 
-    pci_dev = pci_create_noinit(bus, devfn, pci_nic_names[i]);
+    pci_dev = pci_create(bus, devfn, pci_nic_names[i]);
     dev = &pci_dev->qdev;
     if (nd->id)
         dev->id = qemu_strdup(nd->id);
@@ -954,7 +954,7 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,
     PCIDevice *dev;
     PCIBridge *s;
 
-    dev = pci_create_noinit(bus, devfn, "pci-bridge");
+    dev = pci_create(bus, devfn, "pci-bridge");
     qdev_prop_set_uint32(&dev->qdev, "vendorid", vid);
     qdev_prop_set_uint32(&dev->qdev, "deviceid", did);
     qdev_init(&dev->qdev);
@@ -1009,7 +1009,7 @@ void pci_qdev_register_many(PCIDeviceInfo *info)
     }
 }
 
-PCIDevice *pci_create_noinit(PCIBus *bus, int devfn, const char *name)
+PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name)
 {
     DeviceState *dev;
 
@@ -1020,7 +1020,7 @@ PCIDevice *pci_create_noinit(PCIBus *bus, int devfn, const char *name)
 
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)
 {
-    PCIDevice *dev = pci_create_noinit(bus, devfn, name);
+    PCIDevice *dev = pci_create(bus, devfn, name);
     qdev_init(&dev->qdev);
     return dev;
 }
index 8138e74..b867e21 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -339,7 +339,7 @@ typedef struct {
 void pci_qdev_register(PCIDeviceInfo *info);
 void pci_qdev_register_many(PCIDeviceInfo *info);
 
-PCIDevice *pci_create_noinit(PCIBus *bus, int devfn, const char *name);
+PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
 
 /* lsi53c895a.c */
index 17b3732..7cb2d6f 100644 (file)
@@ -125,7 +125,7 @@ int pci_vga_init(PCIBus *bus,
 {
     PCIDevice *dev;
 
-    dev = pci_create_noinit(bus, -1, "VGA");
+    dev = pci_create(bus, -1, "VGA");
     qdev_prop_set_uint32(&dev->qdev, "bios-offset", vga_bios_offset);
     qdev_prop_set_uint32(&dev->qdev, "bios-size", vga_bios_offset);
     qdev_init(&dev->qdev);