diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-04 11:17:51 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:39 -0600 |
commit | f79f2bfc6aae76718652f0b3e15a849f7b58104a (patch) | |
tree | be827c0b6a7ff5e2a521fd5d604773e8f079413c /hw/pci.c | |
parent | 30fbb9fc7cd73abc32ff71ceb59e9a3be37ac128 (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |