Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5293039img; Wed, 27 Mar 2019 06:01:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjdZJaffC9A7DcDyaTNo0675OJ0f0aydws63xj6V4XMpiJO2CbhMx/rO/iSl5Sv0IyfwPc X-Received: by 2002:a65:5249:: with SMTP id q9mr13415004pgp.104.1553691677347; Wed, 27 Mar 2019 06:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553691677; cv=none; d=google.com; s=arc-20160816; b=mbvDK+heI34SzWX09i9wY01EJprxKywBxFDaa/uFtpewOF0uviuk/2eVSAFOxRa8c0 +meyTlEleYrRK0zu3T8lEKTwdfeD86aEomSmI6XL2rW5uVLvve4IWo3Bhw8g5Trj73zh OMtkwq4QYKB0lRPsj5LEVUINT7VjJ9jRl9qARLUG2k169pRKHS7wan/HsjFBUYb44u+W vFP4FNzbbN5axep3gQJ/AtqM9jSBO863VjF4/ODscoqgPMrQWeRIdqa0xqHXYO2aHxhR u5XWU53OT+Tr8sE1BWMPQNLxTRC2rDIADEb4gtR9ZY9l/QSkqduiuqKqIr00WK2tR6uO B4Ig== 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=0f62MwzkvbJXe3m2mt+kRe6ApZxxearKpjSEARZe42s=; b=x8pc5bg6OPFopS5fcJYsOBJWIZbayNr7NhCj3/sR4+EcbnMyhRAN2Jk3K3IaNVkx7F eP2wuHkrjUfLkfKwLhb8kszqgyxf/5X2efBqXROR7iIa0YTaWoDOvO4fQI5dKxu2rqPQ jG6d3uKcxu75MUGplwS94CTykq0J7nHpevdhUIhgNQbSuYhnn00xkmM9R/tc6SxD8lCx TvF80GOrFd9Z2nA/DeXT9fuBKY+210zbOcRe0ydPFxFpeUkGbbd60XP52OaHGbRwE4M5 wHfnlvpjjgVyeCZq1oT+1WPlMssHCqQqnF30Qkiv/dFnhjzUFkm34898WzTEHYAp1JKN 1PhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hOUAjkMJ; 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 o24si17821698pgk.41.2019.03.27.06.01.00; Wed, 27 Mar 2019 06:01:17 -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=hOUAjkMJ; 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 S1728656AbfC0NAS (ORCPT + 99 others); Wed, 27 Mar 2019 09:00:18 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42610 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728216AbfC0NAS (ORCPT ); Wed, 27 Mar 2019 09:00:18 -0400 Received: by mail-wr1-f67.google.com with SMTP id g3so14977434wrx.9 for ; Wed, 27 Mar 2019 06:00:16 -0700 (PDT) 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=0f62MwzkvbJXe3m2mt+kRe6ApZxxearKpjSEARZe42s=; b=hOUAjkMJOFcWXOXv1TP56LEU29Kvxj/aHa4u+wdnH5evb3qUTzbHaEGiEmWRCpUOEI eGB+7pHoQqyyAvUOrg9SY6zpcL3P6zw9B2r0kMVsbwugdm5wpkKEKuwBHY/LPpDjlpQN dLasVIrDddmqqGQ/jTzW+Sks2p85/gavq+7FZGVcOLPpFvKB0jiwR5ZR0FELMOTi7KvA fjIgai8FFakFmk3aRqJs+ALZyznNKpH/Esu88fgkQdRRXaTi5xwH6r7DI/0ziU6SJfXu O9KEBxPMhEp1oMBz2FF8EZz5VSrj1rxUXRXfXVD6XBBYsnCbqF6qzqfc0FiuN94BCnwf qc9g== 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=0f62MwzkvbJXe3m2mt+kRe6ApZxxearKpjSEARZe42s=; b=s++EyGrYtekk3OllkxDKKylkXMPsiKc59fBHueYK4IlpvwZ3sTeYy1WrB5uLkZAZ3V oMjBNjquWfzsXqRBk67M39Nv4Ib0uYWcucOWp1ClNynHDMbKwFFimZjW4nKyJMNb+5U2 HNse5PfUV6CrqDY3DElDtBjnomAPSkj/9epR8C2FV4M5geOpGXoiN81GjWjDDqzopaGQ 3Z4lSZ+JYz7zzav+ymw/PgzvHV8hDIEIq1y3QiWENVSJ1+j7C4MbRpPfIWmMvaW2xLte nIBjMVWeqsDoL29fyZbLu1p1mPuEi3SFqxq6aSBdDFMk0d+kkiT6Kod11rRhwZbz24wJ ufjw== X-Gm-Message-State: APjAAAXvo591dqA6bX+bCLSm/FAK9R9Z9RCJvO+bL7H6QFSYyK28klKR 0RC59mauF2Q4rETePZSaAfeimg== X-Received: by 2002:a5d:544a:: with SMTP id w10mr2322135wrv.276.1553691616116; Wed, 27 Mar 2019 06:00:16 -0700 (PDT) Received: from [192.168.0.44] (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.googlemail.com with ESMTPSA id k9sm26349119wru.55.2019.03.27.06.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 06:00:15 -0700 (PDT) Subject: Re: [PATCH 1/1] thermal: stm32: simplify getting .driver_data To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Zhang Rui , Eduardo Valentin , Maxime Coquelin , Alexandre Torgue , linux-pm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org References: <20190319163635.30891-1-wsa+renesas@sang-engineering.com> From: Daniel Lezcano Message-ID: <62d8b5a6-ed22-b0ec-ff3e-b545840b1210@linaro.org> Date: Wed, 27 Mar 2019 14:00:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190319163635.30891-1-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 19/03/2019 17:36, 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/st/stm_thermal.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c > index bbd73c5a4a4e..cf9ddc52f30e 100644 > --- a/drivers/thermal/st/stm_thermal.c > +++ b/drivers/thermal/st/stm_thermal.c > @@ -570,8 +570,7 @@ static int stm_thermal_prepare(struct stm_thermal_sensor *sensor) > static int stm_thermal_suspend(struct device *dev) > { > int ret; > - struct platform_device *pdev = to_platform_device(dev); > - struct stm_thermal_sensor *sensor = platform_get_drvdata(pdev); > + struct stm_thermal_sensor *sensor = dev_get_drvdata(dev); > > ret = stm_thermal_sensor_off(sensor); > if (ret) > @@ -585,8 +584,7 @@ static int stm_thermal_suspend(struct device *dev) > static int stm_thermal_resume(struct device *dev) > { > int ret; > - struct platform_device *pdev = to_platform_device(dev); > - struct stm_thermal_sensor *sensor = platform_get_drvdata(pdev); > + struct stm_thermal_sensor *sensor = dev_get_drvdata(dev); > > ret = stm_thermal_prepare(sensor); > if (ret) > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog