Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1746
b: refs/heads/master
c: e131832
h: refs/heads/master
v: v3
  • Loading branch information
Dave Jones committed Jun 1, 2005
1 parent c36ffcb commit 3b241e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c29f1403098135bdef75b190a5037db514701031
refs/heads/master: e131832ca7d3a3e5f9c7624bb310a7747dc2b57c
6 changes: 5 additions & 1 deletion trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ static unsigned int def_sampling_rate;
#define MIN_SAMPLING_RATE (def_sampling_rate / 2)
#define MAX_SAMPLING_RATE (500 * def_sampling_rate)
#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
#define DEF_SAMPLING_DOWN_FACTOR (10)
#define DEF_SAMPLING_DOWN_FACTOR (1)
#define MAX_SAMPLING_DOWN_FACTOR (10)
#define TRANSITION_LATENCY_LIMIT (10 * 1000)

static void do_dbs_timer(void *data);
Expand Down Expand Up @@ -129,6 +130,9 @@ static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused,
if (ret != 1 )
return -EINVAL;

if (input > MAX_SAMPLING_DOWN_FACTOR || input < 1)
return -EINVAL;

down(&dbs_sem);
dbs_tuners_ins.sampling_down_factor = input;
up(&dbs_sem);
Expand Down

0 comments on commit 3b241e1

Please sign in to comment.