1 Jun 2005 18:57
[PATCH 2.6.12-rc5] policy->lock in cpufreq_add_dev
Michal Schmidt <xschmi00 <at> stud.feec.vutbr.cz>
2005-06-01 16:57:12 GMT
2005-06-01 16:57:12 GMT
Hello, I think that it's not necessary to take the policy->lock in cpufreq_add_dev. Am I missing something? What is the lock supposed to protect from? Michal
diff -Nurp -X linux/Documentation/dontdiff linux/drivers/cpufreq/cpufreq.c linux.mich/drivers/cpufreq/cpufreq.c --- linux/drivers/cpufreq/cpufreq.c 2005-05-31 12:59:41.000000000 +0200 +++ linux.mich/drivers/cpufreq/cpufreq.c 2005-06-01 18:42:50.000000000 +0200 <at> <at> -605,7 +605,7 <at> <at> static int cpufreq_add_dev (struct sys_d policy->cpu = cpu; policy->cpus = cpumask_of_cpu(cpu); - init_MUTEX_LOCKED(&policy->lock); + init_MUTEX(&policy->lock); init_completion(&policy->kobj_unregister); INIT_WORK(&policy->update, handle_update, (void *)(long)cpu); <at> <at> -646,8 +646,7 <at> <at> static int cpufreq_add_dev (struct sys_d spin_unlock_irqrestore(&cpufreq_driver_lock, flags); policy->governor = NULL; /* to assure that the starting sequence is * run in cpufreq_set_policy */ - up(&policy->lock); - + /* set default policy */ ret = cpufreq_set_policy(&new_policy);(Continue reading)
RSS Feed