1
0

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>
Este cometimento está contido em:
Daniel Lezcano
2012-10-31 01:05:16 +01:00
cometido por Rafael J. Wysocki
ascendente c96ca4fb76
cometimento 349631e0e4
2 ficheiros modificados com 7 adições e 7 eliminações

Ver ficheiro

@@ -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)