From nobody Sun May 10 21:56:07 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12710C433EF for ; Fri, 22 Apr 2022 12:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1447538AbiDVMgc (ORCPT ); Fri, 22 Apr 2022 08:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447581AbiDVMg3 (ORCPT ); Fri, 22 Apr 2022 08:36:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E2B0C5715B for ; Fri, 22 Apr 2022 05:33:35 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1F29C1576; Fri, 22 Apr 2022 05:33:35 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 65CA13F5A1; Fri, 22 Apr 2022 05:33:34 -0700 (PDT) From: Robin Murphy To: joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: Use dev_iommu_ops() for probe_finalize Date: Fri, 22 Apr 2022 13:33:27 +0100 Message-Id: <84b891ba40e4cea924ee4ea1167b00e87ad38b18.1650630616.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.35.3.dirty MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The ->probe_finalize hook only runs after ->probe_device succeeds, so we can move that over to the new dev_iommu_ops() as well. Signed-off-by: Robin Murphy Reviewed-by: Lu Baolu --- Another cheeky little one which doesn't need to wait... drivers/iommu/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 1b8dcda5fbe4..8825a4628e46 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -315,7 +315,7 @@ static int __iommu_probe_device(struct device *dev, str= uct list_head *group_list =20 int iommu_probe_device(struct device *dev) { - const struct iommu_ops *ops =3D dev->bus->iommu_ops; + const struct iommu_ops *ops; struct iommu_group *group; int ret; =20 @@ -352,6 +352,7 @@ int iommu_probe_device(struct device *dev) mutex_unlock(&group->mutex); iommu_group_put(group); =20 + ops =3D dev_iommu_ops(dev); if (ops->probe_finalize) ops->probe_finalize(dev); =20 --=20 2.35.3.dirty