mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
cpufreq: Move to_gov_attr_set() to cpufreq.h
So it can be reused by other codes. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
26291c54e1
commit
ae26508651
@ -8,11 +8,6 @@
|
|||||||
|
|
||||||
#include "cpufreq_governor.h"
|
#include "cpufreq_governor.h"
|
||||||
|
|
||||||
static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj)
|
|
||||||
{
|
|
||||||
return container_of(kobj, struct gov_attr_set, kobj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct governor_attr *to_gov_attr(struct attribute *attr)
|
static inline struct governor_attr *to_gov_attr(struct attribute *attr)
|
||||||
{
|
{
|
||||||
return container_of(attr, struct governor_attr, attr);
|
return container_of(attr, struct governor_attr, attr);
|
||||||
|
@ -658,6 +658,11 @@ struct gov_attr_set {
|
|||||||
/* sysfs ops for cpufreq governors */
|
/* sysfs ops for cpufreq governors */
|
||||||
extern const struct sysfs_ops governor_sysfs_ops;
|
extern const struct sysfs_ops governor_sysfs_ops;
|
||||||
|
|
||||||
|
static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj)
|
||||||
|
{
|
||||||
|
return container_of(kobj, struct gov_attr_set, kobj);
|
||||||
|
}
|
||||||
|
|
||||||
void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node);
|
void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node);
|
||||||
void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node);
|
void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node);
|
||||||
unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node);
|
unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node);
|
||||||
|
Loading…
Reference in New Issue
Block a user