aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-12-12 17:41:41 -0500
committerDave Jones <davej@redhat.com>2006-12-12 17:41:41 -0500
commitc4366889dda8110247be59ca41fddb82951a8c26 (patch)
tree705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /drivers/cpufreq/cpufreq.c
parentdb2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff)
parente1036502e5263851259d147771226161e5ccc85a (diff)
Merge ../linus
Conflicts: drivers/cpufreq/cpufreq.c
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 0c18ac2fe7c2..9fb2edf36611 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -42,9 +42,8 @@ static struct cpufreq_policy *cpufreq_cpu_data[NR_CPUS];
42static DEFINE_SPINLOCK(cpufreq_driver_lock); 42static DEFINE_SPINLOCK(cpufreq_driver_lock);
43 43
44/* internal prototypes */ 44/* internal prototypes */
45static int __cpufreq_governor(struct cpufreq_policy *policy, 45static int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event);
46 unsigned int event); 46static void handle_update(struct work_struct *work);
47static void handle_update(void *data);
48 47
49/** 48/**
50 * Two notifier lists: the "policy" list is involved in the 49 * Two notifier lists: the "policy" list is involved in the
@@ -61,7 +60,7 @@ static int __init init_cpufreq_transition_notifier_list(void)
61 srcu_init_notifier_head(&cpufreq_transition_notifier_list); 60 srcu_init_notifier_head(&cpufreq_transition_notifier_list);
62 return 0; 61 return 0;
63} 62}
64core_initcall(init_cpufreq_transition_notifier_list); 63pure_initcall(init_cpufreq_transition_notifier_list);
65 64
66static LIST_HEAD(cpufreq_governor_list); 65static LIST_HEAD(cpufreq_governor_list);
67static DEFINE_MUTEX (cpufreq_governor_mutex); 66static DEFINE_MUTEX (cpufreq_governor_mutex);
@@ -695,7 +694,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
695 mutex_init(&policy->lock); 694 mutex_init(&policy->lock);
696 mutex_lock(&policy->lock); 695 mutex_lock(&policy->lock);
697 init_completion(&policy->kobj_unregister); 696 init_completion(&policy->kobj_unregister);
698 INIT_WORK(&policy->update, handle_update, (void *)(long)cpu); 697 INIT_WORK(&policy->update, handle_update);
699 698
700 /* call driver. From then on the cpufreq must be able 699 /* call driver. From then on the cpufreq must be able
701 * to accept all calls to ->verify and ->setpolicy for this CPU 700 * to accept all calls to ->verify and ->setpolicy for this CPU
@@ -925,9 +924,11 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
925} 924}
926 925
927 926
928static void handle_update(void *data) 927static void handle_update(struct work_struct *work)
929{ 928{
930 unsigned int cpu = (unsigned int)(long)data; 929 struct cpufreq_policy *policy =
930 container_of(work, struct cpufreq_policy, update);
931 unsigned int cpu = policy->cpu;
931 dprintk("handle_update for cpu %u called\n", cpu); 932 dprintk("handle_update for cpu %u called\n", cpu);
932 cpufreq_update_policy(cpu); 933 cpufreq_update_policy(cpu);
933} 934}
@@ -1599,7 +1600,6 @@ int cpufreq_update_policy(unsigned int cpu)
1599} 1600}
1600EXPORT_SYMBOL(cpufreq_update_policy); 1601EXPORT_SYMBOL(cpufreq_update_policy);
1601 1602
1602#ifdef CONFIG_HOTPLUG_CPU
1603static int cpufreq_cpu_callback(struct notifier_block *nfb, 1603static int cpufreq_cpu_callback(struct notifier_block *nfb,
1604 unsigned long action, void *hcpu) 1604 unsigned long action, void *hcpu)
1605{ 1605{
@@ -1639,7 +1639,6 @@ static struct notifier_block __cpuinitdata cpufreq_cpu_notifier =
1639{ 1639{
1640 .notifier_call = cpufreq_cpu_callback, 1640 .notifier_call = cpufreq_cpu_callback,
1641}; 1641};
1642#endif /* CONFIG_HOTPLUG_CPU */
1643 1642
1644/********************************************************************* 1643/*********************************************************************
1645 * REGISTER / UNREGISTER CPUFREQ DRIVER * 1644 * REGISTER / UNREGISTER CPUFREQ DRIVER *