Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163094
b: refs/heads/master
c: 8aa84ad
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Renninger authored and Dave Jones committed Sep 1, 2009
1 parent 2c34f63 commit d0ee6a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bfa042cd304aa48cf05cd0a13c2d0794a675c0e
refs/heads/master: 8aa84ad8d6c740a04386f599694609ee4998e82e
9 changes: 8 additions & 1 deletion trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,9 @@ static struct attribute *default_attrs[] = {
NULL
};

struct kobject *cpufreq_global_kobject;
EXPORT_SYMBOL(cpufreq_global_kobject);

#define to_policy(k) container_of(k, struct cpufreq_policy, kobj)
#define to_attr(a) container_of(a, struct freq_attr, attr)

Expand Down Expand Up @@ -1935,7 +1938,11 @@ static int __init cpufreq_core_init(void)
per_cpu(policy_cpu, cpu) = -1;
init_rwsem(&per_cpu(cpu_policy_rwsem, cpu));
}

cpufreq_global_kobject = kobject_create_and_add("cpufreq",
&cpu_sysdev_class.kset.kobj);
BUG_ON(!cpufreq_global_kobject);

return 0;
}

core_initcall(cpufreq_core_init);
10 changes: 10 additions & 0 deletions trunk/include/linux/cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ static inline int cpufreq_unregister_notifier(struct notifier_block *nb,

struct cpufreq_governor;

/* /sys/devices/system/cpu/cpufreq: entry point for global variables */
extern struct kobject *cpufreq_global_kobject;

#define CPUFREQ_ETERNAL (-1)
struct cpufreq_cpuinfo {
unsigned int max_freq;
Expand Down Expand Up @@ -274,6 +277,13 @@ struct freq_attr {
ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count);
};

struct global_attr {
struct attribute attr;
ssize_t (*show)(struct kobject *kobj,
struct attribute *attr, char *buf);
ssize_t (*store)(struct kobject *a, struct attribute *b,
const char *c, size_t count);
};

/*********************************************************************
* CPUFREQ 2.6. INTERFACE *
Expand Down

0 comments on commit d0ee6a5

Please sign in to comment.