From patchwork Wed Dec 5 14:36:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 10714279 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ACF3513BB for ; Wed, 5 Dec 2018 14:37:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CA502C8E0 for ; Wed, 5 Dec 2018 14:37:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90B0D2D224; Wed, 5 Dec 2018 14:37:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 838822C8E0 for ; Wed, 5 Dec 2018 14:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727094AbeLEOhL (ORCPT ); Wed, 5 Dec 2018 09:37:11 -0500 Received: from 8bytes.org ([81.169.241.247]:51858 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727549AbeLEOgy (ORCPT ); Wed, 5 Dec 2018 09:36:54 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id DF96B432; Wed, 5 Dec 2018 15:36:52 +0100 (CET) From: Joerg Roedel To: iommu@lists.linux-foundation.org Cc: Lorenzo Pieralisi , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel Subject: [PATCH 3/4] iommu/of: Don't call iommu_ops->add_device directly Date: Wed, 5 Dec 2018 15:36:45 +0100 Message-Id: <20181205143646.4876-4-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181205143646.4876-1-joro@8bytes.org> References: <20181205143646.4876-1-joro@8bytes.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Joerg Roedel Make sure to invoke this call-back through the proper function of the IOMMU-API. Signed-off-by: Joerg Roedel --- drivers/iommu/of_iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index c5dd63072529..4d4847de727e 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -218,10 +218,10 @@ const struct iommu_ops *of_iommu_configure(struct device *dev, ops = dev->iommu_fwspec->ops; /* * If we have reason to believe the IOMMU driver missed the initial - * add_device callback for dev, replay it to get things in order. + * probe for dev, replay it to get things in order. */ - if (ops && ops->add_device && dev->bus && !dev->iommu_group) - err = ops->add_device(dev); + if (dev->bus && !dev->iommu_group) + err = iommu_probe_device(dev); /* Ignore all other errors apart from EPROBE_DEFER */ if (err == -EPROBE_DEFER) {