Received: by 10.192.165.148 with SMTP id m20csp1780672imm; Thu, 3 May 2018 05:25:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoYGuUosQWbzQwFlnaVLuc4nyPjjX4PONFTOuO6lhskfod4Um/udUHoxDhftaibnTjraeQC X-Received: by 10.98.34.24 with SMTP id i24mr6442900pfi.53.1525350336986; Thu, 03 May 2018 05:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525350336; cv=none; d=google.com; s=arc-20160816; b=V2fg87QVBhsYKWpABIHyOAK0GftK4jLKutT6WhmgK5G7lCLo7VbqyQuTS4ekeCaaIv Sa8Tjeyr7KY9V62JO2H9f2CxZFSw3G2yJXSRdf46DbJ3RTpa8DL2kgb7t/OmxEB3e3Ew 3L2/fSOeasIKnfEJgK8UUxjxzTvzsKLio8fKzq+WZqDdAYgU1vTevKum/fVJ2TJvqLuE 2/e+33CNrOJiCBBCWYux6jArt+TDiRiv4banz2Q3ApglBE1ft7uEkWvemGLCM7YX16r0 okRk0Wsd0v3Mfkm14YRaAMCN2NZhIXEsH5pw+W2QiiqjuU9cPURkD6ttBzBeOTmXVR5p TviA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/lFFDHTM/tfdKqneVu6S0m4GofBGLxR3F+gHxmhq8Wc=; b=zh7zB52W1Kbe0ON1Zzw3avHA6aSts2DAPqw75OTrhquhiuqKG6SQ6V0pVQ1PhtEL39 /4zLW8SZ0/fXheXM/KRlDtm7yGTku/501Xig2dCFpfZHIv0RTCU+A/k5pLxoTpECHvAq XYBRqn5WDWKCJSYuk8DrvTHc0l2vEuA7R/DBtKNotjVGh6E7Kq2STOSRvILPi928pzKH Vii2gPkRHIPcEznLDTzqLvlQj++S8vrooVYHe5cjN+1slFUHxjbNu701R8MCdLN7/yDb ppL1DjwX0ibrCL35SFlO/Wg/TgnGUEMVhEpmqMZGfxy5WJfjtDUBC4+hPiGVlOfOq18Y 8jUg== 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 j18-v6si11253278pgn.78.2018.05.03.05.25.22; Thu, 03 May 2018 05:25:36 -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 S1752169AbeECMXZ (ORCPT + 99 others); Thu, 3 May 2018 08:23:25 -0400 Received: from gloria.sntech.de ([95.129.55.99]:43348 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751185AbeECMXV (ORCPT ); Thu, 3 May 2018 08:23:21 -0400 Received: from wd0766.dip.tu-dresden.de ([141.76.110.254] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fEDGS-0000sI-Pr; Thu, 03 May 2018 14:23:12 +0200 From: Heiko Stuebner To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Zhang Rui , Eduardo Valentin , Jun Nie , Baoyou Xie , Shawn Guo , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH 50/61] thermal: simplify getting .drvdata Date: Thu, 03 May 2018 14:23:07 +0200 Message-ID: <3499277.H47n29vZV6@phil> In-Reply-To: <20180419140641.27926-51-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-51-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, 19. April 2018, 16:06:20 CEST schrieb Wolfram Sang: > 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/thermal/rockchip_thermal.c | 8 +++----- > drivers/thermal/spear_thermal.c | 8 +++----- > drivers/thermal/zx2967_thermal.c | 6 ++---- > 3 files changed, 8 insertions(+), 14 deletions(-) > > diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c > index f36375d5a16c..9c7643d62ed7 100644 > --- a/drivers/thermal/rockchip_thermal.c > +++ b/drivers/thermal/rockchip_thermal.c > @@ -1327,8 +1327,7 @@ static int rockchip_thermal_remove(struct platform_device *pdev) > > static int __maybe_unused rockchip_thermal_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev); > + struct rockchip_thermal_data *thermal = dev_get_drvdata(dev); > int i; > > for (i = 0; i < thermal->chip->chn_num; i++) > @@ -1346,8 +1345,7 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev) > > static int __maybe_unused rockchip_thermal_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev); > + struct rockchip_thermal_data *thermal = dev_get_drvdata(dev); > int i; > int error; > > @@ -1376,7 +1374,7 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev) > id, thermal->regs, > thermal->tshut_temp); > if (error) > - dev_err(&pdev->dev, "%s: invalid tshut=%d, error=%d\n", > + dev_err(dev, "%s: invalid tshut=%d, error=%d\n", > __func__, thermal->tshut_temp, error); > } > for the Rockchip-part Reviewed-by: Heiko Stuebner