Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp469149ybh; Tue, 10 Mar 2020 02:13:48 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv6Vy2+FoHyTus3737UXsNW5o4gZulT8XzpjpVhavzo/Lwlmve1QdyIp8x0uktWBHfj8mjy X-Received: by 2002:aca:5210:: with SMTP id g16mr429088oib.174.1583831627851; Tue, 10 Mar 2020 02:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583831627; cv=none; d=google.com; s=arc-20160816; b=0ugV9/18cOOh5tCmO0sYWQIXhf16MRxHejkqvuPQNRv84WpCkKqqqf9YzjOOVB62w1 1vx54JMZtSNzZ0vDb9lFCFJzxcT86EdDtRq3ZcKuop/PGxsrV2IGMXgkaS0RmlLSzTpJ 32QiJyO/UIb+wVc0Ixbj0jgLJ8xT2aF10YigY4mlxLyvWvGmEET2Bkw9pWzWKN/QDRfC Laib5pdsGTZ2bot7FV3k2G36a3dnAEkvxWfy9O9KA3C60DL19cRlyUKtwU7/eD5vVaDf uY2b1UvkL6lW2PFpX1rYJEod7JSYQRVC1x6pRy0Caq7kO/Af27cQEpbthz3lx2qHL5ey n8Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Migiamxqddx+SYv7HFDTizwcRStARp8S8bjWKV9P1nQ=; b=Nkr3hi3Cu6qlwMayqJmYbzPANaV6Vlb11EhvfpGAuC0kxFjndtBvOoocFjRKXuC6zs h1/HbfMXRVfBOuFSt1jnT8iPp1N4uZRk+6KFmI4cdNOCvAwornMPeVlon0TSLZ4M98Mi lg68p31ZOD0Iiqp0J8fm7bUy/4r+1mbglm5pfLL/0DNuZ3YmwtEao3FM7wmBPVfsa+zl 7kvRfwZ9mlUkKfSD5SDWKkzDO9hSkNY9JM5EltMxrRE/dXmUSpRC6aF6kDetGwrKAg6u 9g9XH7QaUUMmPgDsPvZhypsFTvsmXT4hYOrkyPhpx092HESJB291GmlYcaziRz0D6FMP 9hhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si5436297oif.215.2020.03.10.02.13.36; Tue, 10 Mar 2020 02:13:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbgCJJND (ORCPT + 99 others); Tue, 10 Mar 2020 05:13:03 -0400 Received: from 8bytes.org ([81.169.241.247]:50622 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbgCJJMh (ORCPT ); Tue, 10 Mar 2020 05:12:37 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id C678FD42; Tue, 10 Mar 2020 10:12:33 +0100 (CET) From: Joerg Roedel To: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, virtualization@lists.linux-foundation.org, Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Rob Clark , Sean Paul , Will Deacon , Robin Murphy , Joerg Roedel , Matthias Brugger , Thierry Reding , Jean-Philippe Brucker , Andy Gross , Bjorn Andersson , Joerg Roedel Subject: [PATCH 11/15] iommu/renesas: Use accessor functions for iommu private data Date: Tue, 10 Mar 2020 10:12:25 +0100 Message-Id: <20200310091229.29830-12-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200310091229.29830-1-joro@8bytes.org> References: <20200310091229.29830-1-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel Make use of dev_iommu_priv_set/get() functions. Signed-off-by: Joerg Roedel --- drivers/iommu/ipmmu-vmsa.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index ecb3f9464dd5..310cf09feea3 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -89,9 +89,7 @@ static struct ipmmu_vmsa_domain *to_vmsa_domain(struct iommu_domain *dom) static struct ipmmu_vmsa_device *to_ipmmu(struct device *dev) { - struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); - - return fwspec ? fwspec->iommu_priv : NULL; + return dev_iommu_priv_get(dev); } #define TLB_LOOP_TIMEOUT 100 /* 100us */ @@ -727,14 +725,13 @@ static phys_addr_t ipmmu_iova_to_phys(struct iommu_domain *io_domain, static int ipmmu_init_platform_device(struct device *dev, struct of_phandle_args *args) { - struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); struct platform_device *ipmmu_pdev; ipmmu_pdev = of_find_device_by_node(args->np); if (!ipmmu_pdev) return -ENODEV; - fwspec->iommu_priv = platform_get_drvdata(ipmmu_pdev); + dev_iommu_priv_set(dev, platform_get_drvdata(ipmmu_pdev)); return 0; } -- 2.17.1