Received: by 10.192.165.156 with SMTP id m28csp777365imm; Thu, 19 Apr 2018 07:25:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx485k5zCqUrvy3v9s9tCDMunWpiLTQ2HN73O20OB+g8Wb3qkF4ZoZEaZYHDmX1P5q6DblT18 X-Received: by 10.101.96.141 with SMTP id t13mr5415467pgu.222.1524147902179; Thu, 19 Apr 2018 07:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147902; cv=none; d=google.com; s=arc-20160816; b=xD4xx7kB367kxsJ6zTRAs25eGNjBNEZ1/3R8uGzZDuS8PkCpcNNX5e3uOIc6zsGQwG 1gttxZVJhvSoIIYT7VIzspaWi9qgPX+xIRs4zesmPUxegBOFyFE8l3NDJuJz53P/two+ 18Gz7vo0A/KMMl2SBU+U+gI5xO3tj3RNmEAy2xES1DUa/kfGyu6+SJaQgKzAdIYPexya tbPiFaGURYyigyWFFObeWwqDkvNMpZOo8jwLIj1W1rgdIn43ciEAuPHTpenKgO9n1QKE 05aDss2RGdVETKIGSKsN41/RD7zsl4OX/stqpWqmaFcSpjvjBSYTRtP5aAngxnfLJZ+1 Qv9A== 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:arc-authentication-results; bh=R9nvgOBVn/by0j3q4nHfSoaPiPGItmneED4hIOWIh2s=; b=ldhHHdRx6ZeDBMfVk+47GF1iMNwHw2kk7G6WNv8rtoVKCeTu6XRkNQ1X5vOfz29w61 7Jkpr7ofLong8Z1nfgOEbPrMDFHdf/q5FdB2QIAaTwtRSOxnBzkzxO6RoiLbF2YKvNPi pwPqutjW+Cp5DVgixnfpoza4h09/Oh7S+xgFLsPkRf89jRQ26PV00HUm6gJmMaPE9+8V NSj1Tw+lNnW9ypNaieYTywQz+9I5Srcbi7RfDOGuLLjQHIRPcZmmBnOlnn6UQMGPjPM1 ic7205a8ZdHDdmubBMILLksYUq3+g95obQeilpVsdrnoV9UX5tnBF6LmnTjz4a2Waqk2 iD8Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si3691201plb.312.2018.04.19.07.24.48; Thu, 19 Apr 2018 07:25:02 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753564AbeDSOV7 (ORCPT + 99 others); Thu, 19 Apr 2018 10:21:59 -0400 Received: from sauhun.de ([88.99.104.3]:45270 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753384AbeDSOHA (ORCPT ); Thu, 19 Apr 2018 10:07:00 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id A8EA93139C4; Thu, 19 Apr 2018 16:06:58 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Rob Clark , Joerg Roedel , iommu@lists.linux-foundation.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 24/61] iommu: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:54 +0200 Message-Id: <20180419140641.27926-25-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. drivers/iommu/qcom_iommu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index 65b9c99707f8..fe88a4880d3a 100644 --- a/drivers/iommu/qcom_iommu.c +++ b/drivers/iommu/qcom_iommu.c @@ -885,16 +885,14 @@ static int qcom_iommu_device_remove(struct platform_device *pdev) static int __maybe_unused qcom_iommu_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct qcom_iommu_dev *qcom_iommu = platform_get_drvdata(pdev); + struct qcom_iommu_dev *qcom_iommu = dev_get_drvdata(dev); return qcom_iommu_enable_clocks(qcom_iommu); } static int __maybe_unused qcom_iommu_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct qcom_iommu_dev *qcom_iommu = platform_get_drvdata(pdev); + struct qcom_iommu_dev *qcom_iommu = dev_get_drvdata(dev); qcom_iommu_disable_clocks(qcom_iommu); -- 2.11.0