cpuidle / sysfs: move structure declaration into the sysfs.c file
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 31 Oct 2012 00:05:16 +0000 (01:05 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Nov 2012 23:34:21 +0000 (00:34 +0100)
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>
drivers/cpuidle/sysfs.c
include/linux/cpuidle.h

index ed87399bb02b0101b32cd1d9ae5cf2c34282f189..f15c1e56e16ff81ba6e7387ed87f501d54e03d18 100644 (file)
@@ -297,6 +297,13 @@ static struct attribute *cpuidle_state_default_attrs[] = {
        NULL
 };
 
+struct cpuidle_state_kobj {
+       struct cpuidle_state *state;
+       struct cpuidle_state_usage *state_usage;
+       struct completion kobj_unregister;
+       struct kobject kobj;
+};
+
 #define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj)
 #define kobj_to_state(k) (kobj_to_state_obj(k)->state)
 #define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage)
index 279b1eaa8b7304bf1028b6f91acedf4f15317148..7daf0e3b93bd0f3af399b7ae28f2ec6f3bb2be38 100644 (file)
@@ -82,13 +82,6 @@ cpuidle_set_statedata(struct cpuidle_state_usage *st_usage, void *data)
        st_usage->driver_data = data;
 }
 
-struct cpuidle_state_kobj {
-       struct cpuidle_state *state;
-       struct cpuidle_state_usage *state_usage;
-       struct completion kobj_unregister;
-       struct kobject kobj;
-};
-
 struct cpuidle_device {
        unsigned int            registered:1;
        unsigned int            enabled:1;