Skip to content

Commit 655e6fe

Browse files
Sui Jingfengbjorn-helgaas
authored andcommitted
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]>
1 parent 7e845ec commit 655e6fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/vgaarb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev)
765765
u16 cmd;
766766

767767
/* Only deal with VGA class devices */
768-
if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
768+
if (!pci_is_vga(pdev))
769769
return false;
770770

771771
/* Allocate structure */

0 commit comments

Comments
 (0)