Skip to content

Commit

Permalink
cpuidle / sysfs: move structure declaration into the sysfs.c file
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
dlezcano authored and rafaeljw committed Nov 14, 2012
1 parent c96ca4f commit 349631e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 7 additions & 0 deletions drivers/cpuidle/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 0 additions & 7 deletions include/linux/cpuidle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 349631e

Please sign in to comment.