From nobody Wed Oct 8 21:34:40 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F44A2EE97D; Tue, 24 Jun 2025 20:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750797056; cv=none; b=WdQff0G40ch74p4N49LmR9mOhkJLfDpc4femxxhF6MDr1V2Ooa7YK6MXCzbXKVtO8doYS7aWiylXW16sW3HGGTmZKI1+CTv95aYRqhlvW8vbNHch/T14rp3VWVqLV+t7zUuZaaZ8sgnnu2V/K2vO1EUBrugCyn6ttanK/eyzpwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750797056; c=relaxed/simple; bh=LQvOsrvAxtIF9zfBp3smdp/HiFPvr9jOTvuEZPP26Xw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QTgQcURysCuopnrJu/v7nK2siiOv0IW3trSwXB4tClHRh0hw2GKdfPd9492oGwVerRnZlIeWNk5m/wt3+oSnpT/r0jcDKhxyvDH+B6BzB8Ot83BsUNcSRhVGsqIUeth4ExexdMwhArUglabI7pbrC3aAs5poJ+ZIrGExP31DjFs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=grwUq4Az; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="grwUq4Az" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C72AFC4CEF3; Tue, 24 Jun 2025 20:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750797056; bh=LQvOsrvAxtIF9zfBp3smdp/HiFPvr9jOTvuEZPP26Xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=grwUq4Azg2rXwcXTPBvEhrqfy4Fp289hvna9O8cgNI7bLHp4lR1i0g/5gOFDdT/1/ SAU/MlJDFjn5D+sGiSHzU6Hk+w0gt2j+dV6DQkY7Wf/0U8ah7i96QY//0MWQPcAm2D tH5CdqIardMhctjwYl3iYp4OY6IcfS/bJxJqnhgP4aLGcJK5ZQGq52VMsMx7aWZPJr sXa67NCUjivkoC/MJRlN8LUdG5QNQeNwtSq7w3YJTsRXiGfZjcydJi5yZGWRA3X6uT pQ16bnh7PwD/kgiOg3R+UPuEGjuqmNbejLRyJvAr++Mq+ENrgDgLXq+57HPva+iZKH Leb77Jzke4Hjw== From: Mario Limonciello To: Bjorn Helgaas Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Simona Vetter , Lukas Wunner , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , Alex Williamson , Jaroslav Kysela , Takashi Iwai , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list), iommu@lists.linux.dev (open list:INTEL IOMMU (VT-d)), linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), kvm@vger.kernel.org (open list:VFIO DRIVER), linux-sound@vger.kernel.org (open list:SOUND), Daniel Dadap , Mario Limonciello , Simona Vetter , Bjorn Helgaas Subject: [PATCH v5 3/9] vga_switcheroo: Use pci_is_display() Date: Tue, 24 Jun 2025 15:30:36 -0500 Message-ID: <20250624203042.1102346-4-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250624203042.1102346-1-superm1@kernel.org> References: <20250624203042.1102346-1-superm1@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Mario Limonciello The inline pci_is_display() helper does the same thing. Use it. Reviewed-by: Daniel Dadap Reviewed-by: Simona Vetter Suggested-by: Bjorn Helgaas Signed-off-by: Mario Limonciello --- drivers/gpu/vga/vga_switcheroo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switche= roo.c index 18f2c92beff8e..68e45a26e85f7 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -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) =3D=3D 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. --=20 2.43.0