aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-04 11:17:51 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:39 -0600
commitf79f2bfc6aae76718652f0b3e15a849f7b58104a (patch)
treebe827c0b6a7ff5e2a521fd5d604773e8f079413c /hw/pci.c
parent30fbb9fc7cd73abc32ff71ceb59e9a3be37ac128 (diff)
qdev: don't access name through info
We already have a QOM interface for this so let's use it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 5345079ce7..516da08ee8 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1493,7 +1493,7 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
if (pci_dev == NULL)
return -1;
if (qdev->hotplugged && info->no_hotplug) {
- qerror_report(QERR_DEVICE_NO_HOTPLUG, info->qdev.name);
+ qerror_report(QERR_DEVICE_NO_HOTPLUG, object_get_typename(OBJECT(pci_dev)));
do_pci_unregister_device(pci_dev);
return -1;
}
@@ -1534,7 +1534,7 @@ static int pci_unplug_device(DeviceState *qdev)
PCIDeviceInfo *info = container_of(qdev_get_info(qdev), PCIDeviceInfo, qdev);
if (info->no_hotplug) {
- qerror_report(QERR_DEVICE_NO_HOTPLUG, info->qdev.name);
+ qerror_report(QERR_DEVICE_NO_HOTPLUG, object_get_typename(OBJECT(dev)));
return -1;
}
return dev->bus->hotplug(dev->bus->hotplug_qdev, dev,
@@ -1742,7 +1742,7 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
if (qdev_get_info(&pdev->qdev)->vmsd)
snprintf(name, sizeof(name), "%s.rom", qdev_get_info(&pdev->qdev)->vmsd->name);
else
- snprintf(name, sizeof(name), "%s.rom", qdev_get_info(&pdev->qdev)->name);
+ snprintf(name, sizeof(name), "%s.rom", object_get_typename(OBJECT(pdev)));
pdev->has_rom = true;
memory_region_init_ram(&pdev->rom, name, size);
vmstate_register_ram(&pdev->rom, &pdev->qdev);