Skip to contentSkip to conversation

runtime_pm: register parameters

PATCH Applied Sergey Senozhatsky 2 participants 2 messages Dec 19, 2012 – Jan 31, 2013

lore
Share & tools
lore

Sergey Senozhatsky

author
#0 lore raw

PATCH 2/2 runtime_pm: register parameters

register parameter during runtime_pmdevice() construction, making call to get_parameter_value() in power_usage() valid.

Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

 src/devices/runtime_pm.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
src/devices/runtime_pm.cpp +4 -4
index 0d13cab..bbc3bf0 100644
@@ -49,11 +49,11 @@ runtime_pmdevice::runtime_pmdevice(const char *_name, const char *path) : device
 
 	before_suspended_time = 0;
 	before_active_time = 0;
-        after_suspended_time = 0;
+	after_suspended_time = 0;
 	after_active_time = 0;
-}
-
 
+	register_parameter(humanname);
+}
 
 void runtime_pmdevice::start_measurement(void)
 {
@@ -237,4 +237,4 @@ void create_all_runtime_pm_devices(void)
 	do_bus("spi");
 	do_bus("platform");
 	do_bus("i2c");
-}
\ No newline at end of file
+}
Applied
#1 lore raw
Quoted 37 lines · On Wed, 19 Dec 2012 18:13:23 +0300 Sergey Senozhatsky…

register parameter during runtime_pmdevice() construction, making call to get_parameter_value() in power_usage() valid.

Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

 src/devices/runtime_pm.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
src/devices/runtime_pm.cpp +4 -4
index 0d13cab..bbc3bf0 100644
@@ -49,11 +49,11 @@ runtime_pmdevice::runtime_pmdevice(const char
 *_name, const char *path) : device 
 	before_suspended_time = 0;
 	before_active_time = 0;
-        after_suspended_time = 0;
+	after_suspended_time = 0;
 	after_active_time = 0;
-}
-
 
+	register_parameter(humanname);
+}
 
 void runtime_pmdevice::start_measurement(void)
 {
@@ -237,4 +237,4 @@ void create_all_runtime_pm_devices(void)
 	do_bus("spi");
 	do_bus("platform");
 	do_bus("i2c");
-}
\ No newline at end of file
+}
Quoted 4 lines

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop

Applied, thanks.

Kristen