From patchwork Fri Jun 21 13:22:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 167385 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp740742ilk; Fri, 21 Jun 2019 06:23:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsjZT/9JU2E5My61doeYeCBCVAIp1Bclr4FEUzI6Wi55Y4nXlS9AvJqCbF5u1PHED3qu5n X-Received: by 2002:a17:90a:7f02:: with SMTP id k2mr6711009pjl.78.1561123408013; Fri, 21 Jun 2019 06:23:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561123408; cv=none; d=google.com; s=arc-20160816; b=q9JwGjgqNq8Q6tizTebSRVqO1GBCbpxkUrkkXOkti+gAeZ5PneUiFdNP33lluKXYQ1 ko7/0lS77CoZ8trWWd5dVstqEkL/IitwBzVKLFl93+Ea9YSZdbmprLHEXoWxgm8YnojD IYy/iJQO2FMiMR+ouP6V9DqesoW6nkfWtLexgsVrke1mM8i9yQmpnJ70n3C6kLgNjcLO RQRzlOvZgJkWfWGH2ndmjVMDTJ1gEB//IobnynQrfFGbgFM/Mx/5BTbDE+Tvkm5NZXDG PWv985U3RFBnPZMTF2vyq4FFkXHqtObJQzs2/GbrL2EELqQ9SaasMqiUfR22PnLREqgH 1FOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Ivwcwk4wjlXTEFrBezW9m8Osb/vrzZPgsbaTndGY63w=; b=VWva8T3yCtFqeyzFOFikdB+KZNkt78xDyYwCcT8tgRqJqgkEM3/F/i/y5Ch+47FxGy RiEFj2cx2uLSL5Jj8Ig1i1QLsidwThrztEkKiL5dExD8ajuua6Z5gNZTzQOHRuGgK9pk lCL5HT4xyD7pn1qIPSw2IHQjv/9/Ta/oqxO54+PlqW3DRRYFkiFWDB6x/32gVGxNBAfX aDfE/c2uD46pYFsPQQrEpCfG5o3c+0rZofKD0TYMdgHrAtM47HCxPhYHb/nwKAB66TyG WrV8zY+ljNpIo4syGlwDE21SNxY7+0cscNLv3m9R68DpPhlNcqcxedRxELzXTo4Wpt/3 JwBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lTye1pRr; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 l1si2699422plb.302.2019.06.21.06.23.27; Fri, 21 Jun 2019 06:23:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=lTye1pRr; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1726115AbfFUNX1 (ORCPT + 11 others); Fri, 21 Jun 2019 09:23:27 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38221 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfFUNX0 (ORCPT ); Fri, 21 Jun 2019 09:23:26 -0400 Received: by mail-wm1-f67.google.com with SMTP id s15so6596327wmj.3 for ; Fri, 21 Jun 2019 06:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Ivwcwk4wjlXTEFrBezW9m8Osb/vrzZPgsbaTndGY63w=; b=lTye1pRrvYZaUqUpAY6fIcyP/rdkZZeh1TaiSOM/mfknHGEy22SVpna5CjRIIwa1bl Dgw016BteCVdF+4HcJTkyQLXjmxEnozwPGmJwAJ1Nc+nP87UN6B8j1uyHwMEmJHqAmau byssz6VnmjMEZmF/DPqgWpfYmPBXNmeItqpwu56fXX/y4S77vtGkOxSkHsRrxpR/rBNj k3e+tXOsg3ycq1FtK/wrwuCRt8bOTCRyfzyCv14YsscKyFOeVWYZUYFeaxC5EORYMgk5 Ds6ek3TI/7ZxwqWYSuz5MseJ0ww/p1NukAJLbKQ69SSdCpI0Z6KgPQxjntLWq1XfKeQt leBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ivwcwk4wjlXTEFrBezW9m8Osb/vrzZPgsbaTndGY63w=; b=cNtS3v42Lm338LkbLxbM2oy5/T+dXfnQCVH2Gm91KxWSOSvNk5VRmSVIcnbMN2Et4h dKpvjbvQr0JDoKczK6qdVNAsaHEyPjtP1gkEdkCM//3bD1GSCqO2fYNIWGorquhxt+5J F2w2L/vPb19F4Vvt21/1p3U+HzLcRUWUMvzPFTPPB8ZJXDnXQKpuBjzG2c/9CS+33VUE 7ke07sm/NnQcHNzAbSfYjYYEkvPLlKT7E5Qqt7oPJIetBeEWjvBByvylxDs1Y84nvYuP zdsnPZW+8/bPZQHjo1AY05nWIdgsc+Fq3eTZ66LPLe/SzMMO5kevZi+YCUFF0UVDrDT/ 1LsQ== X-Gm-Message-State: APjAAAWqu8WxBemHHs0BlJBgLPF7SCxabicIy72JiEEedsWc/moQC4CM BhawfTOlzegn4lWD+/ftxX8o2Q== X-Received: by 2002:a1c:39d6:: with SMTP id g205mr3957146wma.85.1561123404531; Fri, 21 Jun 2019 06:23:24 -0700 (PDT) Received: from clegane.local (206.105.129.77.rev.sfr.net. [77.129.105.206]) by smtp.gmail.com with ESMTPSA id s188sm1981234wmf.40.2019.06.21.06.23.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jun 2019 06:23:23 -0700 (PDT) From: Daniel Lezcano To: viresh.kumar@linaro.org Cc: edubezval@gmail.com, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY SCALING FRAMEWORK) Subject: [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro Date: Fri, 21 Jun 2019 15:22:57 +0200 Message-Id: <20190621132302.30414-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The functions stub already exist for the condition the IS_ENABLED is trying to avoid. Remove the IS_ENABLED macros as they are pointless. Signed-off-by: Daniel Lezcano --- drivers/cpufreq/cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.17.1 Acked-by: Viresh Kumar diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 85ff958e01f1..7c72f7d3509c 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1378,8 +1378,7 @@ static int cpufreq_online(unsigned int cpu) if (cpufreq_driver->ready) cpufreq_driver->ready(policy); - if (IS_ENABLED(CONFIG_CPU_THERMAL) && - cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) + if (cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) policy->cdev = of_cpufreq_cooling_register(policy); pr_debug("initialization complete\n"); @@ -1469,8 +1468,7 @@ static int cpufreq_offline(unsigned int cpu) goto unlock; } - if (IS_ENABLED(CONFIG_CPU_THERMAL) && - cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) { + if (cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) { cpufreq_cooling_unregister(policy->cdev); policy->cdev = NULL; } From patchwork Fri Jun 21 13:23:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 167390 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp741093ilk; Fri, 21 Jun 2019 06:23:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1TKz8D1r+QLKPmi11MDy7dWYHeNUvNeQN5hndgkrH1+9igH7nI7DnDSaqHhAh7a6Qk/nV X-Received: by 2002:a63:3383:: with SMTP id z125mr4747854pgz.8.1561123422980; Fri, 21 Jun 2019 06:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561123422; cv=none; d=google.com; s=arc-20160816; b=wuv21gd+ygkLRA9gKaOQmt+mA9M9yf6ILi898o0zocX620ZzYzl4RG3s0Truz56Cca M7UbUEimz2WnZuzPoN4ufJrEusfqxCmoKlHZGKfkIr7V4YHr2aK4h90j/Jm/atYHIZpS 7r5f9Jp1YObYhu34ieh2pAEKE3WQeUDjHV3FwP2dCtvuJY2t3NPtwHYZcfhyFCEJAE5+ VPmOvzoNeiNFfXmyYIU1kN6l8Rq4Nyuqn0tgRvOicOIZhMToAagstEuBtkcXjNQ6tEB6 vUTjBXvKSy1sANiUL+JPWlj3qwaI7S9bnLTfY5DrtnCA8Juc2xMo3EhnkWKyLZb55osj ZxoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=abmrRJIbn15CKe4jAYwpNznA72/AKAAATV1fQchJZq8=; b=Da8TKSNn0aHo0lnY/c4a6Cdqj7Vv67Ve5tmpVdU6kfxhjYpSvJDih3avm3ANLrtEWF 1nXzQzDW+4IrFFwFyjlpcu9K1XEW2qvHxv/PVsptTPBh5qcIVrsvIstNgPRuO4PTzPyo 17f50fLkhq5rhE/86F9/Da4EF7tqciAgbmvmjKx0q5vQ222UwKUKzcC5T3gZsbydUM09 GNKVZunS3Y4COwjFDWtuu/CWcLQlJZjfKwQNGsEgb5wTg2rL15XfbV/cR8yIZawmywYs XHt1jzjLDxQcQJGb4SKiwEIouHO3jidXxMAErA/FElZ4jE6hSX8cQKELMzzITmKXzDmX 26YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cdA8J+bs; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 d12si2797709pla.121.2019.06.21.06.23.42; Fri, 21 Jun 2019 06:23:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=cdA8J+bs; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1726278AbfFUNXd (ORCPT + 11 others); Fri, 21 Jun 2019 09:23:33 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54896 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbfFUNXc (ORCPT ); Fri, 21 Jun 2019 09:23:32 -0400 Received: by mail-wm1-f68.google.com with SMTP id g135so6305992wme.4 for ; Fri, 21 Jun 2019 06:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=abmrRJIbn15CKe4jAYwpNznA72/AKAAATV1fQchJZq8=; b=cdA8J+bs/MRPvemLKcO6rzSy1aIFncfOfsoPbv9tLkihvL9mR4vUHXGqZNRGWY8WeV 1n9+lWedZTxuMsje160UJwcaqNftcjDQp4mxgB7FHoYZI4CSc75WEBKTHuQic248qlmi pazm4zf7Y1Pgjm+nUkUA77Wu2YaqCgurF5nI35cHs15xD75THN46ZKDrj/7QSBboJzk+ PLvf9reZ/A4i9sggeYiNObhNmqpgzzWYJIbaPZtAjwEiIqVz/KeRzHpp93W4+GOZwRpV SA3x+XMTA0QvUIedkoGk4pc4pvnMUVXuzwvE9uMOKHkU/KGf94zZkX0uI9wdWxlDbz9L ky8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=abmrRJIbn15CKe4jAYwpNznA72/AKAAATV1fQchJZq8=; b=jhMd3pYiW8ywqnbQV6eXKc9/dsZ7JKCEBZ5XFOJwGL0I1TUJjycZ9dv4KdbF7wyzYY T3PkxTrWisHHFwG9btjvxZ7oriQ3mFqzx6gaymBSN+NYpKrKMNtnat4+8bgFj679NTnd XSY67n10337VXsgmd3J5BvmK7zjpqVgplXeUfqVHSP/NSkyfqIMWAkrX1A4uwiuvpINa bmZ21E9oBA3X04UfLkkn/EFwEAPbk36NKDAmi9P4aF0YI2C4eFWgADh/3TILPRyov1Mt EBPj0MrY+NDU+WwpRMepAkLRT07CGi3wxFxDrlv/iu9PIWwB0xtK96+1VVzo+sOf5ed2 XqOw== X-Gm-Message-State: APjAAAXl1tNDgdzNhmVtLaGjYel5Ch257p+7QAKWpWhPsBUta+zw9Ocv ZGB/x0LyrMuVUzMLzmmN9RXZig== X-Received: by 2002:a1c:8a:: with SMTP id 132mr4159361wma.44.1561123410813; Fri, 21 Jun 2019 06:23:30 -0700 (PDT) Received: from clegane.local (206.105.129.77.rev.sfr.net. [77.129.105.206]) by smtp.gmail.com with ESMTPSA id s188sm1981234wmf.40.2019.06.21.06.23.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jun 2019 06:23:30 -0700 (PDT) From: Daniel Lezcano To: viresh.kumar@linaro.org Cc: edubezval@gmail.com, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY SCALING FRAMEWORK) Subject: [PATCH 4/6] cpufreq: Remove cooling device usage Date: Fri, 21 Jun 2019 15:23:00 +0200 Message-Id: <20190621132302.30414-4-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190621132302.30414-1-daniel.lezcano@linaro.org> References: <20190621132302.30414-1-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq_cooling_unregister() function uses now the policy to unregister itself. The only purpose of the cooling device pointer is to unregister the cpu cooling device. As there is no more need of this pointer, remove it. Signed-off-by: Daniel Lezcano --- drivers/cpufreq/cpufreq.c | 6 ++---- include/linux/cpufreq.h | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) -- 2.17.1 Acked-by: Viresh Kumar diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index dfbc9bea606c..1d8f85faeaca 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1379,7 +1379,7 @@ static int cpufreq_online(unsigned int cpu) cpufreq_driver->ready(policy); if (cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) - policy->cdev = of_cpufreq_cooling_register(policy); + of_cpufreq_cooling_register(policy); pr_debug("initialization complete\n"); @@ -1468,10 +1468,8 @@ static int cpufreq_offline(unsigned int cpu) goto unlock; } - if (cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) { + if (cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) cpufreq_cooling_unregister(policy); - policy->cdev = NULL; - } if (cpufreq_driver->stop_cpu) cpufreq_driver->stop_cpu(policy); diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index d01a74fbc4db..9a42711f338b 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -144,9 +144,6 @@ struct cpufreq_policy { /* For cpufreq driver's internal use */ void *driver_data; - - /* Pointer to the cooling device if used for thermal mitigation */ - struct thermal_cooling_device *cdev; }; struct cpufreq_freqs { From patchwork Fri Jun 21 13:23:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 167388 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp740948ilk; Fri, 21 Jun 2019 06:23:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOHzAqwVAHkWp2cr1OdpKo6wnQT5w6w6yjNqhQexv2SEc9ZjepulX6gHePDEdm7u95S0hG X-Received: by 2002:a63:e953:: with SMTP id q19mr18714043pgj.313.1561123416863; Fri, 21 Jun 2019 06:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561123416; cv=none; d=google.com; s=arc-20160816; b=XAxbk/HmNbTcpgqGE1SHRE26PTCaiM8DroLthyR+beym5hsE+dJSjnZkqWq+pL29Ar ahsTUKVf+asHhtO6iQfqW5/lX8GD9TOpS0L5dkc7kgLY+rWmn3snBrYQC9fqRYgpVPjG lhBZZjRBaMB/zIpjrFNfWdVKstpTvjD4YymuEv1svzNJ+H3lUmXGSOmR8BNpVR0fZ73+ oHyp7jifx5GNmMjDDPVuyOqytgshgJM7yk3mXpKLUW9gz9V7Gr+IU3Nw2zVnbGJskvX0 hUMwK4kTrcWfj7L4UVsqg7yIiEuxJoqH4HcEGVttp0eaPUokE0X308A8wrcu+WpiiihV PAcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=fq+Z50AlOAOovE68oIdAizLRw1Oe4GlAcSjc3Z5IAmg=; b=xAjX1MZMgdk9QGlRsMxnWRaltGjHFMEd7ulRy8xBRXErZX83r+8sw79a17AGa5ZAK2 yC8j2tMFZ6cbb3oACw4aWMun9EbKdlazSNuS1Cg+MqBH7Da/eDcDgwTLBewrw6D99ua0 UwHA77C/8mp5pTW7i5/+ILxrpRY48NtnSxfGyKZeYZ5j9UTti2wWSrgW7hnMWxMUbfiO 24ape98AyQrnPYqi4S61TNcZ/GewLLhmvLvZDCoLrBI2Y+AO5kbL3YL82tQ2fRMrD4HZ rehrnckwvf1ScZjT++QRC6/bIzG5TgtHupU+MdfHojVgdQNGNT1RG1yqljzVrjnoe0vq BGlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cy8gsxAu; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 y16si833831pfe.129.2019.06.21.06.23.36; Fri, 21 Jun 2019 06:23:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=Cy8gsxAu; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1726070AbfFUNXg (ORCPT + 11 others); Fri, 21 Jun 2019 09:23:36 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40840 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbfFUNXf (ORCPT ); Fri, 21 Jun 2019 09:23:35 -0400 Received: by mail-wr1-f66.google.com with SMTP id p11so6566493wre.7 for ; Fri, 21 Jun 2019 06:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fq+Z50AlOAOovE68oIdAizLRw1Oe4GlAcSjc3Z5IAmg=; b=Cy8gsxAuPsWgA60+HCVbZ+nbzkJ6dlQSJjSVksW3OiAEHQUBROFi9UyiWxOUaGvUFx HuIGfoWy4Oqmng0EYzN9T0AaggH6lVP/7XJARkS/T9U9Klu6591jGN+U57ZTR1LiXr1c sOcYSMoUCEiMdHFihphRgKBFw9928QEYbt3CP05DCmdyHgqpRqZzMXfGgwZkrIKrfaJN o3ZpZVctPxxGqqonaD75qt4XOUxuMJSBAawKhGVPIgftzDjSusRc4HWL8Tz6yG2j9sXu l3c+2p/Bez1KE92iW8V/vPPJqZ4W0WE6Y84xI4VcQfvliIW0jMhlwaHNVfVGSY6eznZ4 juuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fq+Z50AlOAOovE68oIdAizLRw1Oe4GlAcSjc3Z5IAmg=; b=jMjqd/h822calGpYRN+IpUyT48R2vrX2mZH/moi2hnsy03Bid/E07OPP2EwyhNjdde FhLAhsaSe0M6tzrk43EbPlPyxHmO782JAbgdXDUpApJ9zf1kvMa29HiLJUB9/z0119Gw jC4XdKLCA/Fp86uia7kqRhGrgcBDRp+T2ptISK9w2Wpu5I2lP0R1gvyGvfshWLfpZXqx Hh/K/SYV8PZaq2gPq/UtttwNAoZG53h/ECgl2VOjmwnmeCduj8015dB6PewJBcXARof0 pazHLOGquFtUEe81BlxZbErO4RwvtKCUtQCfZDvpTi4Do5YRW1LNCcGD6ErOuSV4xiMc qShQ== X-Gm-Message-State: APjAAAXoeeIMEEymYIBxFgKP++iRYW1kwTeIAtfR1rXq8SgHIUhtY2q1 qLwwVNQvfCzJESvjIIr845QRrA== X-Received: by 2002:adf:ce03:: with SMTP id p3mr73752462wrn.94.1561123412645; Fri, 21 Jun 2019 06:23:32 -0700 (PDT) Received: from clegane.local (206.105.129.77.rev.sfr.net. [77.129.105.206]) by smtp.gmail.com with ESMTPSA id s188sm1981234wmf.40.2019.06.21.06.23.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jun 2019 06:23:32 -0700 (PDT) From: Daniel Lezcano To: viresh.kumar@linaro.org Cc: edubezval@gmail.com, linux-kernel@vger.kernel.org, Zhang Rui , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-pm@vger.kernel.org (open list:THERMAL), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE) Subject: [PATCH 5/6] thermal/drivers/imx: Remove cooling device usage Date: Fri, 21 Jun 2019 15:23:01 +0200 Message-Id: <20190621132302.30414-5-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190621132302.30414-1-daniel.lezcano@linaro.org> References: <20190621132302.30414-1-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq_cooling_unregister() function uses now the policy to unregister itself. The only purpose of the cooling device pointer is to unregister the cpu cooling device. As there is no more need of this pointer, remove it. Signed-off-by: Daniel Lezcano --- drivers/thermal/imx_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 6746f1b73eb7..021c0948b740 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -203,7 +203,6 @@ static struct thermal_soc_data thermal_imx7d_data = { struct imx_thermal_data { struct cpufreq_policy *policy; struct thermal_zone_device *tz; - struct thermal_cooling_device *cdev; enum thermal_device_mode mode; struct regmap *tempmon; u32 c1, c2; /* See formula in imx_init_calib() */ @@ -656,6 +655,7 @@ MODULE_DEVICE_TABLE(of, of_imx_thermal_match); static int imx_thermal_register_legacy_cooling(struct imx_thermal_data *data) { struct device_node *np; + struct thermal_cooling_device *cdev; int ret; data->policy = cpufreq_cpu_get(0); @@ -667,9 +667,9 @@ static int imx_thermal_register_legacy_cooling(struct imx_thermal_data *data) np = of_get_cpu_node(data->policy->cpu, NULL); if (!np || !of_find_property(np, "#cooling-cells", NULL)) { - data->cdev = cpufreq_cooling_register(data->policy); - if (IS_ERR(data->cdev)) { - ret = PTR_ERR(data->cdev); + cdev = cpufreq_cooling_register(data->policy); + if (IS_ERR(cdev)) { + ret = PTR_ERR(cdev); cpufreq_cpu_put(data->policy); return ret; }