Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1385744
| Path | csiph.com!goblin2!goblin1!goblin.stu.neva.ru!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Eduardo Valentin <edubezval@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 05/11] thermal: move emul_temp creation to tz->device.groups |
| Date | Sun, 24 Apr 2016 01:40:02 +0200 |
| Message-ID | <rrfjA-31p-7@gated-at.bofh.it> (permalink) |
| References | <rrfjz-31p-5@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wBfzHOt7JFPAGc9Azw5NWrBJCBSZj3s36h4DDxaSzHc=; b=uKb/CxdP2QST5tmi4ZnGCpNuRPVEW7aNlPSabvv2OzYbCxeUckT2ndpiYbkDnLzQd+ r9x0zMqEmiETXuyjUMhu7b6egkISWMXBRkS5jXznWFLmkvvhZpbbIz0bJAKq7LykC6bN pjNWH8P9UylrbfnxxuZzXrqXn2t2hcgKKKmBq6VzMQX8fFU0dS4fuCBLP3WZ+KfDZyKk GYDIL5fq7ywtchXWf8Q5cPqChrHw1TBmVvuO1FfJTWDz9/yTKk5IqGO1t2LOTvHEHO2q 0aQRa8bTem26Jeuk6dByQ+0LIjvD2goL8+zGbTg2M76v3+Q5Ux8hbTRipRDoLNqQg8oO EQXA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wBfzHOt7JFPAGc9Azw5NWrBJCBSZj3s36h4DDxaSzHc=; b=MbuZNtj/U+aqIDQk1LFlGi+hWp7ft6xEdsrhlfHdS8WWUS4wA2dYPOqttUQOaTnT4p EsfI8cfXAYPI9COC58klGwLoCafB5BrckoGuzxtOpBqNCBzHKkFos6pXte4Ko50NBevD xrK3006LXCe3eFS29OqeE1zJOgVWSAr6wEDKziWAOLgO4XT9NY9aJzcI3G7nEkyb//bC iVmVnJ1xAzWge9szKpriS+MrcPTz/5K+p6QoJ8JMLSjSAtrapjhlsG1o/a8Dgl6OEyJa rKFULf0VaTB0KQmY2kWh9ZmPgCinz3LLPurdLYzLly2koV0rKn1jTktknLEwevRN8bL/ b3CQ== |
| X-Gm-Message-State | AOPr4FXtf98hWUp9NYDj1rKKdOEYakwNFpC/FhnmC6IdWr94WxhK8MwXxmfKGHlaYAABvA== |
| X-Received | by 10.66.66.42 with SMTP id c10mr38216023pat.119.1461454491753; Sat, 23 Apr 2016 16:34:51 -0700 (PDT) |
| X-Mailer | git-send-email 2.1.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 53 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Linux PM <linux-pm@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, Eduardo Valentin <edubezval@gmail.com> |
| X-Original-Date | Sat, 23 Apr 2016 16:34:24 -0700 |
| X-Original-Message-ID | <1461454470-27714-6-git-send-email-edubezval@gmail.com> |
| X-Original-References | <1461454470-27714-1-git-send-email-edubezval@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1385744 |
Show key headers only | View raw
emul_temp creation is dependent on a compile time
condition. Moving to tz->device.groups.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
---
drivers/thermal/thermal_core.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 0a7d918..e32f851 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -996,6 +996,7 @@ create_s32_tzp_attr(offset);
*/
static DEVICE_ATTR(type, 0444, type_show, NULL);
static DEVICE_ATTR(temp, 0444, temp_show, NULL);
+static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store);
static DEVICE_ATTR(policy, S_IRUGO | S_IWUSR, policy_show, policy_store);
static DEVICE_ATTR(available_policies, S_IRUGO, available_policies_show, NULL);
static DEVICE_ATTR(sustainable_power, S_IWUSR | S_IRUGO, sustainable_power_show,
@@ -1004,11 +1005,13 @@ static DEVICE_ATTR(sustainable_power, S_IWUSR | S_IRUGO, sustainable_power_show,
/* These thermal zone device attributes are created based on conditions */
static DEVICE_ATTR(mode, 0644, mode_show, mode_store);
static DEVICE_ATTR(passive, S_IRUGO | S_IWUSR, passive_show, passive_store);
-static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store);
static struct attribute *thermal_zone_dev_attrs[] = {
&dev_attr_type.attr,
&dev_attr_temp.attr,
+#if (IS_ENABLED(CONFIG_THERMAL_EMULATION))
+ &dev_attr_emul_temp.attr,
+#endif
&dev_attr_policy.attr,
&dev_attr_available_policies.attr,
&dev_attr_sustainable_power.attr,
@@ -1893,12 +1896,6 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
goto unregister;
}
- if (IS_ENABLED(CONFIG_THERMAL_EMULATION)) {
- result = device_create_file(&tz->device, &dev_attr_emul_temp);
- if (result)
- goto unregister;
- }
-
/* Update 'this' zone's governor information */
mutex_lock(&thermal_governor_lock);
--
2.1.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[RFC PATCH 05/11] thermal: move emul_temp creation to tz->device.groups Eduardo Valentin <edubezval@gmail.com> - 2016-04-24 01:40 +0200
csiph-web