Skip to content

Commit a7feca7

Browse files
superm1bjorn-helgaas
authored andcommitted
vfio/pci: Use pci_is_display()
The inline pci_is_display() helper does the same thing. Use it. Suggested-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Daniel Dadap <ddadap@nvidia.com> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Acked-by: Alex Williamson <alex.williamson@redhat.com> Link: https://patch.msgid.link/20250717173812.3633478-3-superm1@kernel.org
1 parent 76720ee commit a7feca7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/vfio/pci/vfio_pci_igd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,7 @@ static int vfio_pci_igd_cfg_init(struct vfio_pci_core_device *vdev)
437437

438438
bool vfio_pci_is_intel_display(struct pci_dev *pdev)
439439
{
440-
return (pdev->vendor == PCI_VENDOR_ID_INTEL) &&
441-
((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY);
440+
return (pdev->vendor == PCI_VENDOR_ID_INTEL) && pci_is_display(pdev);
442441
}
443442

444443
int vfio_pci_igd_init(struct vfio_pci_core_device *vdev)

0 commit comments

Comments
 (0)