cpuidle: Fix disabled sysfs entry
Prashant Gaikwad [Wed, 14 Aug 2013 10:33:39 +0000 (15:33 +0530)]
disable parameter is moved from idle state to state_usage.
We need disabled parameter from state to control the state.

Change-Id: I0a17c60fffe1e391916679073e047cab1d90cfb2
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/267250
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/cpuidle/sysfs.c

index c67523f..74d8256 100644 (file)
@@ -267,9 +267,9 @@ static ssize_t store_state_##_name(struct cpuidle_state *state, \
        if (err) \
                return err; \
        if (value) \
-               state_usage->_name = 1; \
+               state->_name = 1; \
        else \
-               state_usage->_name = 0; \
+               state->_name = 0; \
        return size; \
 }
 
@@ -298,8 +298,8 @@ define_show_state_ull_function(usage)
 define_show_state_ull_function(time)
 define_show_state_str_function(name)
 define_show_state_str_function(desc)
-define_show_state_ull_function(disable)
-define_store_state_ull_function(disable)
+define_show_state_function(disabled)
+define_store_state_ull_function(disabled)
 
 define_one_state_ro(name, show_state_name);
 define_one_state_ro(desc, show_state_desc);
@@ -308,7 +308,7 @@ define_one_state_ro(power, show_state_power_usage);
 define_one_state_ro(residency, show_state_target_residency);
 define_one_state_ro(usage, show_state_usage);
 define_one_state_ro(time, show_state_time);
-define_one_state_rw(disable, show_state_disable, store_state_disable);
+define_one_state_rw(disabled, show_state_disabled, store_state_disabled);
 
 static struct attribute *cpuidle_state_default_attrs[] = {
        &attr_name.attr,
@@ -318,7 +318,7 @@ static struct attribute *cpuidle_state_default_attrs[] = {
        &attr_residency.attr,
        &attr_usage.attr,
        &attr_time.attr,
-       &attr_disable.attr,
+       &attr_disabled.attr,
        NULL
 };