Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3406043imu; Mon, 14 Jan 2019 02:23:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN6bY1u2t4wPL+jzZS515rUCri4q9cbZKNUo/VJUqyAaraElBbq3wsHFQYjpX5QFct7XeI5H X-Received: by 2002:a65:6242:: with SMTP id q2mr945174pgv.245.1547461407160; Mon, 14 Jan 2019 02:23:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547461407; cv=none; d=google.com; s=arc-20160816; b=z4TidpzOGYyoyRdYUd5nFF4d8/kf+aPUsOwtg81DVd0C29iwA3V0JljPlRPCgaRbUp WGyrL5oLkEeDcWa4Jvz50cu/hucEzqqHQNDUT4/6wVAxUC0e6advofVCNDKHoNM2PHI/ 1xRYuA3IhNyD6s2Fb4vtQJIeBDDD/t/sb7saNHm/6BJe43vjZFYpzG2Ix4UvXefN6u1V JfUscjk3OiAF5QJ5UM6qgeTL2sLZDmaAMCdNKXV15Nu65X60rQK/XTdSdvoocQItbTu6 o7esJu1gleGiDtYR/Bo+MSMSUo7GQAVyCuObJl7yV3q3paSYhzrckRnmJA6KUkgCJALZ nsMQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=zXivFnp/5TBFesdqg0szzY6jG6uORlmZ4vYSH2Ci7jXDhcdHdmAmX92zJBWkY9q55n YkpdHKhX/K7RonbA0qbrSMkG08cdTAr6Qdq8iClILwZ/1GApBL0RS/p7WLOFS5P0tjtl WCBQ3nFBTv6+ID49Coe7jpniOWEOWuMQMGcRr64KDxcqBvfOfVrsJyky2kFZS69QcEX3 75qXVFsiyynSyq/xKYXijXxt5TYMjlLOXDC2rs5xUkn8M+msNSsvxiDp8JiQ0lcRSWtm dsK7FqjheZ/qYh5gB7fqcOCuARZcQvAu9Qog5xSyj8Czia5sEZF8v9wa/ZtXm4Jq2vsA 69ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZfPUQzxz; 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 1si19739plr.189.2019.01.14.02.23.12; Mon, 14 Jan 2019 02:23:27 -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=ZfPUQzxz; 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 S1726779AbfANKVn (ORCPT + 99 others); Mon, 14 Jan 2019 05:21:43 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44650 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbfANKVj (ORCPT ); Mon, 14 Jan 2019 05:21:39 -0500 Received: by mail-wr1-f66.google.com with SMTP id z5so22121302wrt.11 for ; Mon, 14 Jan 2019 02:21:38 -0800 (PST) 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 :in-reply-to:references; bh=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=ZfPUQzxziYUzsb8yM368ueLuq8ISb7GvH6YdC9XIQEtutmz5I41/tI3dFA5e2RwFc7 GYkI7+V9hD0yfBKSpI6lHiq4ZPxwtBDFQ8TDBBXW9ENe9G1yDPZ5uLMzW3jDWSP2sK6Z uP0Djba+mAuFnqCUqls4txjXp6QmOcpCWPogk= 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:in-reply-to:references; bh=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=hf+/niGx6BCBFnHQzbzHnssYO9QW4Q4x+p7hd2FxVBHnRhWZVemFT+/vva2FT77IDJ nsm7i+f20dzE5t3p/x+vvLhgwswSEIPO5kea9i9QeS0gP4E0EzT9zHL4IWKdIyJeoUbb xThMN897/3Iy2KAacFJG8upvRHusXiroPNvisPvYkVR8jENlcXkp7bndTKon33kBPHO9 mrm5H0OofLgeX1sjjL6ZCbmX/MCsGu0LHVPwAvuXJwMA8Z6gIu082imwzVj79kJeH1OT /WiLEUH/wUxbdazlWqI8ywXyLsIOuNbEAFjLskYb/X3L884TLVg6KvzCuQucyfzr/gyn rWeQ== X-Gm-Message-State: AJcUukfyYP9sDZrf61tRVvHyNKB8YMECnb3G9/PlgJnDdPh7eYSfSiN2 0bXg5dIvl38aIgbe8wUn4+ziaEPSCrY= X-Received: by 2002:adf:de91:: with SMTP id w17mr25144412wrl.320.1547461297218; Mon, 14 Jan 2019 02:21:37 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id a1sm63729951wrw.76.2019.01.14.02.21.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:36 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v2 3/9] drivers: cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy Date: Mon, 14 Jan 2019 15:51:05 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Several cpufreq drivers register themselves as thermal cooling devices. Adding a pointer to struct cpufreq_policy removes the need for them to store this pointer in a private data structure. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8bdfed..9fbc1d996967 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -95,6 +95,9 @@ struct cpufreq_policy { struct cpufreq_frequency_table *freq_table; enum cpufreq_table_sorting freq_table_sorted; + /* Pointer to the cooling device if used for thermal mitigation */ + struct thermal_cooling_device *cooldev; + struct list_head policy_list; struct kobject kobj; struct completion kobj_unregister; -- 2.17.1