]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
vga_switcheroo: Use pci_is_display()
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 17 Jul 2025 17:38:06 +0000 (12:38 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 17 Jul 2025 20:30:13 +0000 (15:30 -0500)
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
drivers/gpu/vga/vga_switcheroo.c

index 18f2c92beff8edeb1638852b9820f1f6e41b14ab..68e45a26e85f7782a1e58ec5fc8c9ac8e34557a3 100644 (file)
@@ -437,7 +437,7 @@ find_active_client(struct list_head *head)
  */
 bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev)
 {
-       if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
+       if (pci_is_display(pdev)) {
                /*
                 * apple-gmux is needed on pre-retina MacBook Pro
                 * to probe the panel if pdev is the inactive GPU.