~ubuntu-branches/ubuntu/utopic/thermald/utopic

« back to all changes in this revision

Viewing changes to debian/patches/0020-cthd_engine-remove-redundant-reads-of-thermal-zone-t.patch

  • Committer: Package Import Robot
  • Author(s): Colin King
  • Date: 2014-05-19 12:41:22 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140519124122-zan11arvjxtbqcq5
Tags: 1.2-1
* Adjust for coretemp path change
* Deny non root users to send system bus dbus messages
* Remove compile warning
* Remove rpmlint warning for manual page
* Remove old patches that are now included into version 1.2
* Sync up with version 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 41bee2100a9b7905f82022aa2ff0b72aeadd1116 Mon Sep 17 00:00:00 2001
2
 
From: Colin Ian King <colin.king@canonical.com>
3
 
Date: Mon, 10 Mar 2014 10:23:49 +0000
4
 
Subject: [PATCH 20/28] cthd_engine: remove redundant reads of thermal zone
5
 
 type files
6
 
 
7
 
takeover_thermal_control() and giveup_thermal_control() both
8
 
contain redundant reads of the thermal zone type fields, so remove
9
 
this code.
10
 
 
11
 
Signed-off-by: Colin Ian King <colin.king@canonical.com>
12
 
---
13
 
 src/thd_engine.cpp | 12 ------------
14
 
 1 file changed, 12 deletions(-)
15
 
 
16
 
diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
17
 
index 565b3d4..c8beed4 100644
18
 
--- a/src/thd_engine.cpp
19
 
+++ b/src/thd_engine.cpp
20
 
@@ -444,14 +444,8 @@ void cthd_engine::takeover_thermal_control() {
21
 
 
22
 
                                i = atoi(entry->d_name + strlen("thermal_zone"));
23
 
                                std::stringstream policy;
24
 
-                               std::stringstream type;
25
 
-                               std::string type_val;
26
 
                                std::string curr_policy;
27
 
 
28
 
-                               type << "thermal_zone" << i << "/type";
29
 
-                               if (sysfs.exists(type.str().c_str())) {
30
 
-                                       sysfs.read(type.str(), type_val);
31
 
-                               }
32
 
                                policy << "thermal_zone" << i << "/policy";
33
 
                                if (sysfs.exists(policy.str().c_str())) {
34
 
                                        sysfs.read(policy.str(), curr_policy);
35
 
@@ -487,13 +481,7 @@ void cthd_engine::giveup_thermal_control() {
36
 
 
37
 
                                i = atoi(entry->d_name + strlen("thermal_zone"));
38
 
                                std::stringstream policy;
39
 
-                               std::stringstream type;
40
 
-                               std::string type_val;
41
 
 
42
 
-                               type << "thermal_zone" << i << "/type";
43
 
-                               if (sysfs.exists(type.str().c_str())) {
44
 
-                                       sysfs.read(type.str(), type_val);
45
 
-                               }
46
 
                                policy << "thermal_zone" << i << "/policy";
47
 
                                if (sysfs.exists(policy.str().c_str())) {
48
 
                                        sysfs.write(policy.str(), zone_preferences[cnt++]);
49
 
1.9.0
50