[PATCH v3 2/7] vfio/pci: Use pci_is_display()
From: Mario Limonciello
Date: Thu Jun 19 2025 - 22:50:49 EST
From: Mario Limonciello <mario.limonciello@xxxxxxx>
The inline pci_is_display() helper does the same thing. Use it.
Acked-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
Reviewed-by: Daniel Dadap <ddadap@xxxxxxxxxx>
Reviewed-by: Simona Vetter <simona.vetter@xxxxxxxx>
Suggested-by: Bjorn Helgaas <helgaas@xxxxxxxxxx>
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
drivers/vfio/pci/vfio_pci_igd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci_igd.c b/drivers/vfio/pci/vfio_pci_igd.c
index ef490a4545f48..988b6919c2c31 100644
--- a/drivers/vfio/pci/vfio_pci_igd.c
+++ b/drivers/vfio/pci/vfio_pci_igd.c
@@ -437,8 +437,7 @@ static int vfio_pci_igd_cfg_init(struct vfio_pci_core_device *vdev)
bool vfio_pci_is_intel_display(struct pci_dev *pdev)
{
- return (pdev->vendor == PCI_VENDOR_ID_INTEL) &&
- ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY);
+ return (pdev->vendor == PCI_VENDOR_ID_INTEL) && pci_is_display(pdev);
}
int vfio_pci_igd_init(struct vfio_pci_core_device *vdev)
--
2.43.0