aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index bbd5c2164ab6..4da28444b235 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -686,6 +686,9 @@ static struct attribute *default_attrs[] = {
686 NULL 686 NULL
687}; 687};
688 688
689struct kobject *cpufreq_global_kobject;
690EXPORT_SYMBOL(cpufreq_global_kobject);
691
689#define to_policy(k) container_of(k, struct cpufreq_policy, kobj) 692#define to_policy(k) container_of(k, struct cpufreq_policy, kobj)
690#define to_attr(a) container_of(a, struct freq_attr, attr) 693#define to_attr(a) container_of(a, struct freq_attr, attr)
691 694
@@ -1935,7 +1938,11 @@ static int __init cpufreq_core_init(void)
1935 per_cpu(policy_cpu, cpu) = -1; 1938 per_cpu(policy_cpu, cpu) = -1;
1936 init_rwsem(&per_cpu(cpu_policy_rwsem, cpu)); 1939 init_rwsem(&per_cpu(cpu_policy_rwsem, cpu));
1937 } 1940 }
1941
1942 cpufreq_global_kobject = kobject_create_and_add("cpufreq",
1943 &cpu_sysdev_class.kset.kobj);
1944 BUG_ON(!cpufreq_global_kobject);
1945
1938 return 0; 1946 return 0;
1939} 1947}
1940
1941core_initcall(cpufreq_core_init); 1948core_initcall(cpufreq_core_init);