aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
authorGautham R Shenoy <ego@in.ibm.com>2006-10-26 06:50:58 -0400
committerDave Jones <davej@redhat.com>2006-11-06 19:16:34 -0500
commite08f5f5bb5dfaaa28d69ffe37eb774533297657f (patch)
tree3cda0e9a1d27c448fb4ceb81737eea695b17d2ed /drivers/cpufreq/cpufreq_ondemand.c
parent95625b8f19e1e030c7fe3c010407d90fa248c68f (diff)
[CPUFREQ] Fix coding style issues in cpufreq.
Clean up cpufreq subsystem to fix coding style issues and to improve the readability. Signed-off-by: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index cbde076b5715..048ec8b1f406 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -41,8 +41,10 @@
41static unsigned int def_sampling_rate; 41static unsigned int def_sampling_rate;
42#define MIN_SAMPLING_RATE_RATIO (2) 42#define MIN_SAMPLING_RATE_RATIO (2)
43/* for correct statistics, we need at least 10 ticks between each measure */ 43/* for correct statistics, we need at least 10 ticks between each measure */
44#define MIN_STAT_SAMPLING_RATE (MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10)) 44#define MIN_STAT_SAMPLING_RATE \
45#define MIN_SAMPLING_RATE (def_sampling_rate / MIN_SAMPLING_RATE_RATIO) 45 (MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10))
46#define MIN_SAMPLING_RATE \
47 (def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
46#define MAX_SAMPLING_RATE (500 * def_sampling_rate) 48#define MAX_SAMPLING_RATE (500 * def_sampling_rate)
47#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000) 49#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
48#define TRANSITION_LATENCY_LIMIT (10 * 1000) 50#define TRANSITION_LATENCY_LIMIT (10 * 1000)
@@ -202,7 +204,8 @@ static ssize_t store_sampling_rate(struct cpufreq_policy *unused,
202 ret = sscanf(buf, "%u", &input); 204 ret = sscanf(buf, "%u", &input);
203 205
204 mutex_lock(&dbs_mutex); 206 mutex_lock(&dbs_mutex);
205 if (ret != 1 || input > MAX_SAMPLING_RATE || input < MIN_SAMPLING_RATE) { 207 if (ret != 1 || input > MAX_SAMPLING_RATE
208 || input < MIN_SAMPLING_RATE) {
206 mutex_unlock(&dbs_mutex); 209 mutex_unlock(&dbs_mutex);
207 return -EINVAL; 210 return -EINVAL;
208 } 211 }
@@ -496,7 +499,8 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
496 if (dbs_enable == 1) { 499 if (dbs_enable == 1) {
497 kondemand_wq = create_workqueue("kondemand"); 500 kondemand_wq = create_workqueue("kondemand");
498 if (!kondemand_wq) { 501 if (!kondemand_wq) {
499 printk(KERN_ERR "Creation of kondemand failed\n"); 502 printk(KERN_ERR
503 "Creation of kondemand failed\n");
500 dbs_enable--; 504 dbs_enable--;
501 mutex_unlock(&dbs_mutex); 505 mutex_unlock(&dbs_mutex);
502 return -ENOSPC; 506 return -ENOSPC;