aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Limonciello <[email protected]>2025-07-17 17:38:05 +0000
committerBjorn Helgaas <[email protected]>2025-07-17 20:30:13 +0000
commita7feca7c88187b83f95dc18ad788015f1bff8939 (patch)
tree0ea5c187e9e7a33274fba4825b0fc5930b54a5d3
parentPCI: Add pci_is_display() to check if device is a display controller (diff)
downloadkernel-a7feca7c88187b83f95dc18ad788015f1bff8939.tar.gz
kernel-a7feca7c88187b83f95dc18ad788015f1bff8939.zip
vfio/pci: Use pci_is_display()
The inline pci_is_display() helper does the same thing. Use it. Suggested-by: Bjorn Helgaas <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Daniel Dadap <[email protected]> Reviewed-by: Simona Vetter <[email protected]> Acked-by: Alex Williamson <[email protected]> Link: https://patch.msgid.link/[email protected]
-rw-r--r--drivers/vfio/pci/vfio_pci_igd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/vfio/pci/vfio_pci_igd.c b/drivers/vfio/pci/vfio_pci_igd.c
index ef490a4545f4..988b6919c2c3 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)