Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp677161imu; Mon, 5 Nov 2018 07:11:01 -0800 (PST) X-Google-Smtp-Source: AJdET5fhKghoAH3BQrNyWDYpWKid1qzyE9bKy3QmvJxrcytOLt4TfWVv37utKm+9fy8KFnmS9VrH X-Received: by 2002:a17:902:b093:: with SMTP id p19-v6mr17111546plr.107.1541430661293; Mon, 05 Nov 2018 07:11:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541430661; cv=none; d=google.com; s=arc-20160816; b=yt5G/7G/kcRvTAcUWucXEVDs8InrHclp2dUHiG/4whFoMxUYUpus3u/EweaVbfon5x DKk0CNkEugJV/naurVmOAeeMYzPztzsV6cAgPMTNFDnbsPZmz49v5e8pZRhVYgjyl+ve bcYy9b+fjeD/hl1NeeuwJmruJDqPH5HeasuQxF8uVuAgJxZ35fbyb4qiy+AacmnbmbLe 5ZwFpjDLRUD21eC8xifwhhprnDbdjQiaP5OtuN+HNBp1hGEFH9tiMXyIBesIWdSPYINa HRXRmWF2JHIYaRIgfYssb+GBDLyS3xuCdoimGi5F3JM49htG/tYTypKMJdMBGRdFga8z 9rlQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Y/02XrycPs554AGD+omIrqDk+d5kh24rPmt72xB31Z4=; b=qi0niycv+59eTuJcEDw2R80XAQRA0eP4WWFEXY+vQOqVOdvSb2v6oZjCuMkwC7jhGt CA3+Otkq/ldiOSa8mxneYkiUpI6+Zpt6XN7PmwoQYN2BQJmHs+lqWCyWM3REmiV7Kli4 s+1Q4ajENy1G8/l0eRnp5wRvne3EpKsMBTD3cOGBQ8OsNnWhPnDi8sSkwGHCBoLmnu2N onaDBsh1VTZPJ/fvowU6gobTqAH7XHc7FSNiG9UzPuFOpMY2J2TF9a1HFaMONfSTjrFP S7uaadCXIYZumzX3RSQF3Ur+I72mCewkpq5jEemVMaTXBg3nKfLPH0zlqW1xq2n5RGS/ YHeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=idrwkyPz; 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 v19-v6si26500159pfn.26.2018.11.05.07.10.32; Mon, 05 Nov 2018 07:11:01 -0800 (PST) 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=idrwkyPz; 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 S1729908AbeKFA1c (ORCPT + 99 others); Mon, 5 Nov 2018 19:27:32 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51710 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729585AbeKFA1c (ORCPT ); Mon, 5 Nov 2018 19:27:32 -0500 Received: by mail-wm1-f68.google.com with SMTP id w7-v6so8688350wmc.1 for ; Mon, 05 Nov 2018 07:07:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Y/02XrycPs554AGD+omIrqDk+d5kh24rPmt72xB31Z4=; b=idrwkyPzuQDOPXIrdD0nrhyeCOEOoPhDK8sSm4e8NfPHIhvmHe3j+McbOsQ/BXOySF E3Kmv2WhBcODXyuk4O3dwUORt4eJjcMx90tQbtgPGiJoBefip5ErF6fN59SyBAuX2qNk 3kSKUNlTyzi2MNePsumh2ez/xVHdLT66fL+xg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Y/02XrycPs554AGD+omIrqDk+d5kh24rPmt72xB31Z4=; b=CGcOFaGi5fMFzcfVNBahoGI1fNZtPzanD2w9+V3v/JCDHqG3+5TxQmNpJ9YcoMUZ6c e/vp5/KF3sd9CEJuwJEII3SYdAsxvkFtwAKKb08ojXuYSCnoKaVsWcwF4wEhfg2E5BqH AO0lZIpTlXQiKaEx87/unjpMJfnfGAY81h/ySgGk3H/WHF5TIy9O4TqcQ88RaIvJCIDT fLs2+uwHMs9enMC6jt9yY0BnmVMKhpiNBEzoWrjThV8SvqERs7za2bXc+ZajuJO3zvJN LpqwXgbuLgABhhI2JYDwRPyHRFRnIe4/SArGrXdWIep1vXT/dTI0/27wLwP0ocsuF7lz ND1A== X-Gm-Message-State: AGRZ1gJiLfBshhWsgYSrsqmsYkHdW4ezLfLOlM28AOeOjYQE+88Iaewj 6yz+BhiU7FqxTo1J9M+z7HuYLg== X-Received: by 2002:a1c:3288:: with SMTP id y130-v6mr6498311wmy.11.1541430441952; Mon, 05 Nov 2018 07:07:21 -0800 (PST) Received: from [192.168.0.40] (119.151.136.77.rev.sfr.net. [77.136.151.119]) by smtp.googlemail.com with ESMTPSA id 137-v6sm8117890wmo.43.2018.11.05.07.07.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 07:07:21 -0800 (PST) Subject: Re: [PATCH 5/5] thermal: zx2967_thermal: simplify getting .driver_data To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Jun Nie , Shawn Guo , Zhang Rui , Eduardo Valentin , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org References: <20181021200053.2194-1-wsa+renesas@sang-engineering.com> <20181021200053.2194-6-wsa+renesas@sang-engineering.com> From: Daniel Lezcano Message-ID: <1de46d0b-a241-8ee6-7bf3-eb8ae4c22251@linaro.org> Date: Mon, 5 Nov 2018 16:07:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181021200053.2194-6-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/2018 22:00, Wolfram Sang wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang Reviewed-by: Daniel Lezcano > --- > > Build tested only. buildbot is happy. > > drivers/thermal/zx2967_thermal.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/thermal/zx2967_thermal.c b/drivers/thermal/zx2967_thermal.c > index 6acce0bce7c0..145ebf371598 100644 > --- a/drivers/thermal/zx2967_thermal.c > +++ b/drivers/thermal/zx2967_thermal.c > @@ -207,8 +207,7 @@ MODULE_DEVICE_TABLE(of, zx2967_thermal_id_table); > #ifdef CONFIG_PM_SLEEP > static int zx2967_thermal_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct zx2967_thermal_priv *priv = platform_get_drvdata(pdev); > + struct zx2967_thermal_priv *priv = dev_get_drvdata(dev); > > if (priv && priv->clk_topcrm) > clk_disable_unprepare(priv->clk_topcrm); > @@ -221,8 +220,7 @@ static int zx2967_thermal_suspend(struct device *dev) > > static int zx2967_thermal_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct zx2967_thermal_priv *priv = platform_get_drvdata(pdev); > + struct zx2967_thermal_priv *priv = dev_get_drvdata(dev); > int error; > > error = clk_prepare_enable(priv->clk_topcrm); > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog