Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp673931imu; Mon, 5 Nov 2018 07:08:32 -0800 (PST) X-Google-Smtp-Source: AJdET5eTu6+OlJxEvQ4crwkwPmes1tanBphFtGXhFhL0ER++z28nwrmwi0DYLLt/nvaXdhIIIdWu X-Received: by 2002:a17:902:a418:: with SMTP id p24-v6mr21663908plq.29.1541430512414; Mon, 05 Nov 2018 07:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541430512; cv=none; d=google.com; s=arc-20160816; b=Ve0M0Suyt6l0lymbKNfxAVj8Q4Y7ehwkZIzIS/zw+OUPdFFbxvlbz9bN/DAFipuf82 Bof+ShyDbqMnHQymTAkpQmIP+4KJ9l38l0LJVNKkLI7R3i6nLvOT3pmeM1dQXzdu8pfy Vb04aBO4PYiNXEzYd+8v6wX78U15Vta1UoCG6u/q8DRO3MLwu3YYRQMNY7uqmmI7S2mJ xPJceLri3vJPZqfJ8Ce4sGMum4KdmPGmBr+GVUeVfn7aKOr5pP+QufGMnZlgKlo0JovY 1ry8iKRkezay7rFCagdDXK4/m4h73WKU6M2eSHEDUOQkwRwu0V+Kq9D1SCF3argBiX8C BMDA== 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=NUh0P/wi1Q78fChV9vZmUMm4I5+PQWgEGme3GofeAnY=; b=SpnKXtlYtHDooXbPZdKGt6utUtDS+MgJY1bVWg1nO8SmaVZqw2OWj3JR8FA7GfVsIw tTfsNuAQLy/6YyQPwiJpvFPYvzrJrvvxone2t2DNIgdYciT7RutpEEytHe/2g0j+b4H5 vgn9Vk9gGEkBihhLN1Fc3XVWkB7rV/xkXu4E/JhoTWjlj8fpAKCqgh1Ehkbblcfx5e6N kD9+9BmT8I6p07VDOceVR3eSH3kP4jzhY0QONqLVQ3/10BSIygnjbTY1TM3FcBqIZFd8 DpX8c17n24HhtG6oWjFr9F8fs0kZm73xCb47Z04wTNAF4zD8LBi7Y4vR7jzg0dByj2VY qtfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HkyidLzr; 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 g80-v6si8884124pfj.37.2018.11.05.07.08.12; Mon, 05 Nov 2018 07:08:32 -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=HkyidLzr; 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 S1730132AbeKFA0m (ORCPT + 99 others); Mon, 5 Nov 2018 19:26:42 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36853 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729438AbeKFA0m (ORCPT ); Mon, 5 Nov 2018 19:26:42 -0500 Received: by mail-wm1-f68.google.com with SMTP id a8-v6so8374819wmf.1 for ; Mon, 05 Nov 2018 07:06:33 -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=NUh0P/wi1Q78fChV9vZmUMm4I5+PQWgEGme3GofeAnY=; b=HkyidLzrQhrb+liEgQr/0qkiK8/cu2lwVE66slYKe7qSUkUIvey/Fn2Qyu3c+N60g/ BsixySThrxygisuJIjeFL7t6ANQ6BkmvCqVA8rVmrPvkIHE+vrxklqMoO2julJNRkBe9 PdbqscpxUVaqzHjAZ1q8N8qWrttJO+g2e6w0E= 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=NUh0P/wi1Q78fChV9vZmUMm4I5+PQWgEGme3GofeAnY=; b=DBnq/6Y8Nx7Zs+zx1E4Ojrt1gZdZkGnYWT7QxsdnHv5sIZGK9w4/yNy/N/0NuGIc8X tG+9SqZwuRALwz/VgzHnFPScTIVrP5PITN1AhP2pSRVF5WQzH/S3oZkeMBEao335TeKE rYXCNZ7i8V1NupVBNOwCw4ZXAJ0aST4+Y5WlVdyFjx9OIa1Qn6hg64PF60uCRIf2+Qwl dj78GzGVHpGk9FFtelNDik245TnFfi3Hv+Be60ygmeK9/jklLGW1Yi/AmIjRZWDNGLh5 c+NI5KBQDPJ3VgTHCvE601okPetNG9l5RVikgY68IquiaJJd3GJPJ+FO5wbGHSCbG//B WA7Q== X-Gm-Message-State: AGRZ1gKNc0N6AE8ni8mwY47JNId9kbtTWjPTS1fmgfUrVzy4A11P7AXu eYaALLI4fdisT6J0Ar+3IKv65Q== X-Received: by 2002:a1c:a757:: with SMTP id q84-v6mr4951657wme.61.1541430392790; Mon, 05 Nov 2018 07:06:32 -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 w18-v6sm10901096wrn.66.2018.11.05.07.06.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 07:06:31 -0800 (PST) Subject: Re: [PATCH 4/5] thermal: st: st_thermal: simplify getting .driver_data To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Zhang Rui , Eduardo Valentin , linux-pm@vger.kernel.org References: <20181021200053.2194-1-wsa+renesas@sang-engineering.com> <20181021200053.2194-5-wsa+renesas@sang-engineering.com> From: Daniel Lezcano Message-ID: <0c7d3c84-c073-087e-eafb-c93bb5d43ea7@linaro.org> Date: Mon, 5 Nov 2018 16:06:30 +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-5-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/st/st_thermal.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c > index be637e6b01d2..b2bbdf6eb02b 100644 > --- a/drivers/thermal/st/st_thermal.c > +++ b/drivers/thermal/st/st_thermal.c > @@ -277,8 +277,7 @@ EXPORT_SYMBOL_GPL(st_thermal_unregister); > #ifdef CONFIG_PM_SLEEP > static int st_thermal_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct st_thermal_sensor *sensor = platform_get_drvdata(pdev); > + struct st_thermal_sensor *sensor = dev_get_drvdata(dev); > > return st_thermal_sensor_off(sensor); > } > @@ -286,8 +285,7 @@ static int st_thermal_suspend(struct device *dev) > static int st_thermal_resume(struct device *dev) > { > int ret; > - struct platform_device *pdev = to_platform_device(dev); > - struct st_thermal_sensor *sensor = platform_get_drvdata(pdev); > + struct st_thermal_sensor *sensor = dev_get_drvdata(dev); > > ret = st_thermal_sensor_on(sensor); > if (ret) > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog