diff options
| author | Sui Jingfeng <[email protected]> | 2023-08-30 19:15:29 +0800 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2023-10-06 17:13:37 -0500 |
| commit | 655e6fe178960c50bfbb0bfe3c4a12c82b1ad918 (patch) | |
| tree | 0e6274a34b0e779701b7f17b44c74bc46dd9cbbd | |
| parent | 7e845ecb2fbfa1bf800e703df29ee2e06592c2a0 (diff) | |
PCI/VGA: Use pci_is_vga() to identify VGA devices
Use pci_is_vga() to identify VGA devices, so the arbiter will handle old
PCI_CLASS_NOT_DEFINED_VGA (0x0001) devices as well as the
PCI_CLASS_DISPLAY_VGA (0x0300) devices it previously handled.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sui Jingfeng <[email protected]>
[bhelgaas: commit log, split functional change from optimization]
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: "Maciej W. Rozycki" <[email protected]>
| -rw-r--r-- | drivers/pci/vgaarb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index 5e6b1eb54c64..2ef3c88e9c33 100644 --- a/drivers/pci/vgaarb.c +++ b/drivers/pci/vgaarb.c @@ -765,7 +765,7 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) u16 cmd; /* Only deal with VGA class devices */ - if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) + if (!pci_is_vga(pdev)) return false; /* Allocate structure */ |