[CPUFREQ] Misc cleanups in ondemand.

Misc cleanups in ondemand. Should have zero functional impact.
Also adding Alexey as author.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>

authored by Venkatesh Pallipadi and committed by Dave Jones ffac80e9 2f8a835c

+19 -31
+19 -31
drivers/cpufreq/cpufreq_ondemand.c
··· 12 12 13 13 #include <linux/kernel.h> 14 14 #include <linux/module.h> 15 - #include <linux/smp.h> 16 15 #include <linux/init.h> 17 - #include <linux/interrupt.h> 18 - #include <linux/ctype.h> 19 16 #include <linux/cpufreq.h> 20 - #include <linux/sysctl.h> 21 - #include <linux/types.h> 22 - #include <linux/fs.h> 23 - #include <linux/sysfs.h> 24 17 #include <linux/cpu.h> 25 - #include <linux/sched.h> 26 - #include <linux/kmod.h> 27 - #include <linux/workqueue.h> 28 18 #include <linux/jiffies.h> 29 19 #include <linux/kernel_stat.h> 30 - #include <linux/percpu.h> 31 20 #include <linux/mutex.h> 32 21 33 22 /* ··· 68 79 * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock 69 80 * is recursive for the same process. -Venki 70 81 */ 71 - static DEFINE_MUTEX (dbs_mutex); 72 - static DECLARE_WORK (dbs_work, do_dbs_timer, NULL); 82 + static DEFINE_MUTEX(dbs_mutex); 73 83 74 84 static struct workqueue_struct *kondemand_wq; 75 85 ··· 130 142 { 131 143 unsigned int input; 132 144 int ret; 133 - ret = sscanf (buf, "%u", &input); 145 + ret = sscanf(buf, "%u", &input); 134 146 135 147 mutex_lock(&dbs_mutex); 136 148 if (ret != 1 || input > MAX_SAMPLING_RATE || input < MIN_SAMPLING_RATE) { ··· 149 161 { 150 162 unsigned int input; 151 163 int ret; 152 - ret = sscanf (buf, "%u", &input); 164 + ret = sscanf(buf, "%u", &input); 153 165 154 166 mutex_lock(&dbs_mutex); 155 167 if (ret != 1 || input > MAX_FREQUENCY_UP_THRESHOLD || ··· 172 184 173 185 unsigned int j; 174 186 175 - ret = sscanf (buf, "%u", &input); 187 + ret = sscanf(buf, "%u", &input); 176 188 if ( ret != 1 ) 177 189 return -EINVAL; 178 190 ··· 337 349 338 350 switch (event) { 339 351 case CPUFREQ_GOV_START: 340 - if ((!cpu_online(cpu)) || 341 - (!policy->cur)) 352 + if ((!cpu_online(cpu)) || (!policy->cur)) 342 353 return -EINVAL; 343 354 344 355 if (policy->cpuinfo.transition_latency > ··· 411 424 lock_cpu_hotplug(); 412 425 mutex_lock(&dbs_mutex); 413 426 if (policy->max < this_dbs_info->cur_policy->cur) 414 - __cpufreq_driver_target( 415 - this_dbs_info->cur_policy, 416 - policy->max, CPUFREQ_RELATION_H); 427 + __cpufreq_driver_target(this_dbs_info->cur_policy, 428 + policy->max, 429 + CPUFREQ_RELATION_H); 417 430 else if (policy->min > this_dbs_info->cur_policy->cur) 418 - __cpufreq_driver_target( 419 - this_dbs_info->cur_policy, 420 - policy->min, CPUFREQ_RELATION_L); 431 + __cpufreq_driver_target(this_dbs_info->cur_policy, 432 + policy->min, 433 + CPUFREQ_RELATION_L); 421 434 mutex_unlock(&dbs_mutex); 422 435 unlock_cpu_hotplug(); 423 436 break; ··· 426 439 } 427 440 428 441 static struct cpufreq_governor cpufreq_gov_dbs = { 429 - .name = "ondemand", 430 - .governor = cpufreq_governor_dbs, 431 - .owner = THIS_MODULE, 442 + .name = "ondemand", 443 + .governor = cpufreq_governor_dbs, 444 + .owner = THIS_MODULE, 432 445 }; 433 446 434 447 static int __init cpufreq_gov_dbs_init(void) ··· 442 455 } 443 456 444 457 445 - MODULE_AUTHOR ("Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>"); 446 - MODULE_DESCRIPTION ("'cpufreq_ondemand' - A dynamic cpufreq governor for " 447 - "Low Latency Frequency Transition capable processors"); 448 - MODULE_LICENSE ("GPL"); 458 + MODULE_AUTHOR("Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>"); 459 + MODULE_AUTHOR("Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>"); 460 + MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for " 461 + "Low Latency Frequency Transition capable processors"); 462 + MODULE_LICENSE("GPL"); 449 463 450 464 module_init(cpufreq_gov_dbs_init); 451 465 module_exit(cpufreq_gov_dbs_exit);