Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vga_switcheroo: 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>
Link: https://patch.msgid.link/20250717173812.3633478-4-superm1@kernel.org

authored by

Mario Limonciello and committed by
Bjorn Helgaas
b1060ea4 a7feca7c

+1 -1
+1 -1
drivers/gpu/vga/vga_switcheroo.c
··· 437 437 */ 438 438 bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev) 439 439 { 440 - if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { 440 + if (pci_is_display(pdev)) { 441 441 /* 442 442 * apple-gmux is needed on pre-retina MacBook Pro 443 443 * to probe the panel if pdev is the inactive GPU.