Commit 655e6fe1 authored by Sui Jingfeng's avatar Sui Jingfeng Committed by Bjorn Helgaas
Browse files

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/20230830111532.444535-3-sui.jingfeng@linux.dev


Signed-off-by: default avatarSui Jingfeng <suijingfeng@loongson.cn>
[bhelgaas: commit log, split functional change from optimization]
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
parent 7e845ecb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */