@@ -69,4 +69,6 @@ typedef struct VFIOConfigMirrorQuirk {
extern const MemoryRegionOps vfio_generic_mirror_quirk;
+#define TYPE_VFIO_PCI_IGD_LPC_BRIDGE "vfio-pci-igd-lpc-bridge"
+
#endif /* HW_VFIO_VFIO_PCI_QUIRKS_H */
@@ -262,7 +262,7 @@ static void vfio_pci_igd_lpc_bridge_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo vfio_pci_igd_lpc_bridge_info = {
- .name = "vfio-pci-igd-lpc-bridge",
+ .name = TYPE_VFIO_PCI_IGD_LPC_BRIDGE,
.parent = TYPE_PCI_DEVICE,
.class_init = vfio_pci_igd_lpc_bridge_class_init,
.interfaces = (InterfaceInfo[]) {
@@ -524,7 +524,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
lpc_bridge = pci_find_device(pci_device_root_bus(&vdev->pdev),
0, PCI_DEVFN(0x1f, 0));
if (lpc_bridge && !object_dynamic_cast(OBJECT(lpc_bridge),
- "vfio-pci-igd-lpc-bridge")) {
+ TYPE_VFIO_PCI_IGD_LPC_BRIDGE)) {
error_report("IGD device %s cannot support legacy mode due to existing "
"devices at address 1f.0", vdev->vbasedev.name);
return;
Define TYPE_VFIO_PCI_IGD_LPC_BRIDGE once to help following where the QOM type is used in the code. We'll use it once more in the next commit. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/vfio/pci-quirks.h | 2 ++ hw/vfio/igd.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)