mirror of https://github.com/torvalds/linux.git
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
This commit is contained in:
parent
76720eed7d
commit
a7feca7c88
|
|
@ -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)
|
bool vfio_pci_is_intel_display(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
return (pdev->vendor == PCI_VENDOR_ID_INTEL) &&
|
return (pdev->vendor == PCI_VENDOR_ID_INTEL) && pci_is_display(pdev);
|
||||||
((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int vfio_pci_igd_init(struct vfio_pci_core_device *vdev)
|
int vfio_pci_igd_init(struct vfio_pci_core_device *vdev)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue