Received: by 10.192.165.148 with SMTP id m20csp375696imm; Fri, 20 Apr 2018 00:11:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx48wo+mcT+Ff+vO88SHsNQ8RWgizA9e7u9xw6HzEWopiKeWdGzA36cQQ2e+wPjY1Cyxl8Xv+ X-Received: by 10.98.34.145 with SMTP id p17mr8770562pfj.236.1524208308585; Fri, 20 Apr 2018 00:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524208308; cv=none; d=google.com; s=arc-20160816; b=eKa2vyYXP0ESdeJmQn5lH2DpExvaPPWSidSrpWKY9TubSStJ//R8VIueR5G6Eum/N5 bHtI18qyIg2two8pm99tErIXcuVq0ue7e9+cxaIdzjPRrvayIHDTAY6Ev3m3IzjT2DJs +5wfbAr4f5cJdMa2aPqEplUgY+PI15L3jr9MQMnNQCLL4V4qFKrUUhNasj0Ff26GYVs8 sqdJXBU7uZsibj8duCEPJI1jUlRp3fea3vfdD9WjVIBTx6bclPUf8SHhKCcaKjqMAW7l PpBFfx+mmlqBemV8mxbOgpUXAG3Pqw8UYLuv5sGGz0yIiW1Zm/nh8EsiNFS53BB1eW0V m16A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=PjX+6QYBiWqEX4ytbHVPFfxS2pouVQKMtTdfkH2WOH8=; b=BoLAdB9TYi13TtFbEDgbkHPBhzqAGCv+bdg5sKuGCIxIZ8vNLGkeLa5W515pwov4e6 09gyTspuiwP+db2nJoSMClue0VA/AlD8H8EPVRnrOnqRX+G8h7ahHpoVGTFFhTNtJApF NiNIphaU2FVwDhea1bpE1LE+heS0yZPLKPplEVlAHOkarc0t64W98g/X2CFwQAe3bNJF TYh17NsLX1y0D0DOXtOkoZouBG2sK/TQfl9tf+gizp8yBqjDra9hOUukycoUGqlCRmDX GtGtUKHYJkNbBnLG9pDxGC1sBMtkestFzV3O2WONP8bU1hIH6LftXU+cANhYJJrWcPwK hcJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zay44THI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si1721357pld.510.2018.04.20.00.11.34; Fri, 20 Apr 2018 00:11:48 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Zay44THI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753991AbeDTHK0 (ORCPT + 99 others); Fri, 20 Apr 2018 03:10:26 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:33427 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753971AbeDTHKW (ORCPT ); Fri, 20 Apr 2018 03:10:22 -0400 Received: by mail-it0-f68.google.com with SMTP id x144-v6so2221952itc.0 for ; Fri, 20 Apr 2018 00:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PjX+6QYBiWqEX4ytbHVPFfxS2pouVQKMtTdfkH2WOH8=; b=Zay44THIfjiC2RHtBtVeGb31atMe/J0q0sCzvV19b/6FNV3Vhp6i0sAYBsDHW6gcaV VXKro8bYk49f30jSD5XZXYvcg92+TGhOy5S3iO1SO3SC0tZb3ncAInlIt93mqjsX9L5N mUTCOxYjQIrVRhBHolPjpuU1FhctO3oPXLZm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PjX+6QYBiWqEX4ytbHVPFfxS2pouVQKMtTdfkH2WOH8=; b=YIKEr07laXXc9dsPgR48OQnBKx0+iRFQKEhVcefXQimYxVaWEfSWk+F9GiOLfHpQNP oTodZhwWtyyyOZmiqws8v1vJJ5XTIktF0im5sFlSLKFPXm6tp7tOuMHTLsOXKTcjjKE/ YHg/b7Fw8rvhyaMtX3NcaOj24qDRhmrMnN2/rWYkT+bGymn9oCu1JsMbJ8f1E5NdNvCw zRNgyc0DxDJeMeZlVsyr64c1RD0NXf3yBuZWY1kIhCTUlpBd805ljKZMjQ7YIsTwBzJO MqC57Ih9pP1x6MgqMrfrmr7MpnANTIrC22KF0frjdVTM7Tbh0eFIQ8lQCreb218WcxDB mqWA== X-Gm-Message-State: ALQs6tBVmDiJ/LpK7FBo2xNy4IiO/+hzoiblYpJR2JxRktMeV2fBeTeL z4KGwKnG5rGUNVqTzd3vQrWbEBiTaTAPIr/sWzH6eXv7 X-Received: by 2002:a24:3941:: with SMTP id l62-v6mr1760100ita.55.1524208221206; Fri, 20 Apr 2018 00:10:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:734a:0:0:0:0:0 with HTTP; Fri, 20 Apr 2018 00:10:20 -0700 (PDT) In-Reply-To: <20180419140641.27926-29-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-29-wsa+renesas@sang-engineering.com> From: Ulf Hansson Date: Fri, 20 Apr 2018 09:10:20 +0200 Message-ID: Subject: Re: [PATCH 28/61] mmc: host: simplify getting .drvdata To: Wolfram Sang Cc: Linux Kernel Mailing List , Linux-Renesas , kernel-janitors@vger.kernel.org, Adrian Hunter , Michal Simek , Tony Prisk , "linux-mmc@vger.kernel.org" , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19 April 2018 at 16:05, Wolfram Sang wrote: > We should get drvdata from struct device directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang Thanks, applied for next! Kind regards Uffe > --- > > 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 >