Received: by 10.192.165.156 with SMTP id m28csp774570imm; Thu, 19 Apr 2018 07:22:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx493Ep0nthGBVxxttQXA0+eb39iPYeNbbLWgIeSAV2H1v5HmoCTsKNfAKUdlXq4svr4BhTVg X-Received: by 10.101.72.201 with SMTP id o9mr5208905pgs.390.1524147738497; Thu, 19 Apr 2018 07:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147738; cv=none; d=google.com; s=arc-20160816; b=oBM8AP4vFufeon3aD7bT0AYfokJz7g+DZKM+2bIh3D1EpMwR6Zuav7D01GIeHaxpkW /CdVi2YCip1y7EWMXJ5QSVLGz6QtvH8NoPrbMBJkJcda6j7nzfOsowMHvp6kH4hxmvC0 OAfQfW5jrMZGVykWvkoa5wRMtdeUWDvUQb2tmui16iUGUhprsTk+2x1R0yOrNXJswDxD ZslBfeE+rXDQSoZ7147YGswyzxQU+dT6jUYrhhrpecP6y/0z/UQRMYJ92+Y1OqHOtUgl qZzEd3GCiN2YXd9OihqdKB9OMJXgaMWgF6GOrhz5GYP8mK0Yh6WYlCK2K76R1Kd2JlxW DfAA== 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=B5541g0z2wPdssf1Csz4eTwBzRbw2WXvmytMgWKTKyM=; b=ypcMe/0dMS3JcHvj0ACGKXPZpAIdfA17XlCLSDp4GyFsd4Qn76vDHSc7jF3zMLwm7r WkqG8SU0HFbsU/i+so6pMjk4tsG+kkRiCigxW53qZN8NJsl12qyT6VY6QAcnwy02TcdK VsAdPiy96WA/EhDUeGskgX4b/UIBQObpxPMX5frJNEQbgQq6rAc9AG/4m6Sw6sg9makF GVKhJm4Ms9EMyVKl/mlJD8V8mnAk1VTAgUnWRTiXMcNUuozOwB+B0dN96Ruqax9XIbML 2k4U/XB2nzUnjRt+OMXJYmgbkG7RepBE8J2GlY8PkzVGECEQNkkbMN0k9Cn78LXk82Tb nnRw== 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 w8si2944543pgv.276.2018.04.19.07.22.04; Thu, 19 Apr 2018 07:22:18 -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 S1753702AbeDSOUv (ORCPT + 99 others); Thu, 19 Apr 2018 10:20:51 -0400 Received: from sauhun.de ([88.99.104.3]:45416 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbeDSOHC (ORCPT ); Thu, 19 Apr 2018 10:07:02 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 8116D3139C8; Thu, 19 Apr 2018 16:07:00 +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 , Ulf Hansson , Adrian Hunter , Michal Simek , Tony Prisk , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 28/61] mmc: host: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:58 +0200 Message-Id: <20180419140641.27926-29-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/mmc/host/davinci_mmc.c | 6 ++---- drivers/mmc/host/sdhci-of-arasan.c | 6 ++---- drivers/mmc/host/wmt-sdmmc.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 8e363174f9d6..9e68c3645e22 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1377,8 +1377,7 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int davinci_mmcsd_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct mmc_davinci_host *host = platform_get_drvdata(pdev); + struct mmc_davinci_host *host = dev_get_drvdata(dev); writel(0, host->base + DAVINCI_MMCIM); mmc_davinci_reset_ctrl(host, 1); @@ -1389,8 +1388,7 @@ static int davinci_mmcsd_suspend(struct device *dev) static int davinci_mmcsd_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct mmc_davinci_host *host = platform_get_drvdata(pdev); + struct mmc_davinci_host *host = dev_get_drvdata(dev); clk_enable(host->clk); mmc_davinci_reset_ctrl(host, 0); diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index c33a5f7393bd..bed3612247b0 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -359,8 +359,7 @@ static const struct sdhci_pltfm_data sdhci_arasan_cqe_pdata = { */ static int sdhci_arasan_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct sdhci_host *host = platform_get_drvdata(pdev); + struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host); int ret; @@ -403,8 +402,7 @@ static int sdhci_arasan_suspend(struct device *dev) */ static int sdhci_arasan_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct sdhci_host *host = platform_get_drvdata(pdev); + struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host); int ret; diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index fd30ac7da5e5..3ba42f508014 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -928,8 +928,7 @@ static int wmt_mci_remove(struct platform_device *pdev) static int wmt_mci_suspend(struct device *dev) { u32 reg_tmp; - struct platform_device *pdev = to_platform_device(dev); - struct mmc_host *mmc = platform_get_drvdata(pdev); + struct mmc_host *mmc = dev_get_drvdata(dev); struct wmt_mci_priv *priv; if (!mmc) @@ -953,8 +952,7 @@ static int wmt_mci_suspend(struct device *dev) static int wmt_mci_resume(struct device *dev) { u32 reg_tmp; - struct platform_device *pdev = to_platform_device(dev); - struct mmc_host *mmc = platform_get_drvdata(pdev); + struct mmc_host *mmc = dev_get_drvdata(dev); struct wmt_mci_priv *priv; if (mmc) { -- 2.11.0