aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle/sysfs.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2012-10-30 20:05:16 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-14 18:34:21 -0500
commit349631e0e411fefa2fed7e0a30b97704562dbd6b (patch)
tree782ef6ca2112a53f5ed43bdb3f6a80b7d8e5b2e2 /drivers/cpuidle/sysfs.c
parentc96ca4fb76b711279be063da083f09b8d65af5c5 (diff)
cpuidle / sysfs: move structure declaration into the sysfs.c file
The structure cpuidle_state_kobj is not used anywhere except in the sysfs.c file. The definition of this structure is not needed in the cpuidle header file. This patch moves it to the sysfs.c file in order to encapsulate the code a bit more. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/sysfs.c')
-rw-r--r--drivers/cpuidle/sysfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index ed87399bb02b..f15c1e56e16f 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -297,6 +297,13 @@ static struct attribute *cpuidle_state_default_attrs[] = {
297 NULL 297 NULL
298}; 298};
299 299
300struct cpuidle_state_kobj {
301 struct cpuidle_state *state;
302 struct cpuidle_state_usage *state_usage;
303 struct completion kobj_unregister;
304 struct kobject kobj;
305};
306
300#define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj) 307#define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj)
301#define kobj_to_state(k) (kobj_to_state_obj(k)->state) 308#define kobj_to_state(k) (kobj_to_state_obj(k)->state)
302#define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage) 309#define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage)