diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq_conservative.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 26f440ccc3fb..4bd33ce8a6f3 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -58,7 +58,7 @@ static unsigned int def_sampling_rate; | |||
58 | #define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000) | 58 | #define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000) |
59 | #define DEF_SAMPLING_DOWN_FACTOR (1) | 59 | #define DEF_SAMPLING_DOWN_FACTOR (1) |
60 | #define MAX_SAMPLING_DOWN_FACTOR (10) | 60 | #define MAX_SAMPLING_DOWN_FACTOR (10) |
61 | #define TRANSITION_LATENCY_LIMIT (10 * 1000) | 61 | #define TRANSITION_LATENCY_LIMIT (10 * 1000 * 1000) |
62 | 62 | ||
63 | static void do_dbs_timer(struct work_struct *work); | 63 | static void do_dbs_timer(struct work_struct *work); |
64 | 64 | ||
@@ -466,9 +466,6 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | |||
466 | (!policy->cur)) | 466 | (!policy->cur)) |
467 | return -EINVAL; | 467 | return -EINVAL; |
468 | 468 | ||
469 | if (policy->cpuinfo.transition_latency > | ||
470 | (TRANSITION_LATENCY_LIMIT * 1000)) | ||
471 | return -EINVAL; | ||
472 | if (this_dbs_info->enable) /* Already enabled */ | 469 | if (this_dbs_info->enable) /* Already enabled */ |
473 | break; | 470 | break; |
474 | 471 | ||
@@ -551,15 +548,17 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | |||
551 | return 0; | 548 | return 0; |
552 | } | 549 | } |
553 | 550 | ||
554 | static struct cpufreq_governor cpufreq_gov_dbs = { | 551 | struct cpufreq_governor cpufreq_gov_conservative = { |
555 | .name = "conservative", | 552 | .name = "conservative", |
556 | .governor = cpufreq_governor_dbs, | 553 | .governor = cpufreq_governor_dbs, |
557 | .owner = THIS_MODULE, | 554 | .max_transition_latency = TRANSITION_LATENCY_LIMIT, |
555 | .owner = THIS_MODULE, | ||
558 | }; | 556 | }; |
557 | EXPORT_SYMBOL(cpufreq_gov_conservative); | ||
559 | 558 | ||
560 | static int __init cpufreq_gov_dbs_init(void) | 559 | static int __init cpufreq_gov_dbs_init(void) |
561 | { | 560 | { |
562 | return cpufreq_register_governor(&cpufreq_gov_dbs); | 561 | return cpufreq_register_governor(&cpufreq_gov_conservative); |
563 | } | 562 | } |
564 | 563 | ||
565 | static void __exit cpufreq_gov_dbs_exit(void) | 564 | static void __exit cpufreq_gov_dbs_exit(void) |
@@ -567,7 +566,7 @@ static void __exit cpufreq_gov_dbs_exit(void) | |||
567 | /* Make sure that the scheduled work is indeed not running */ | 566 | /* Make sure that the scheduled work is indeed not running */ |
568 | flush_scheduled_work(); | 567 | flush_scheduled_work(); |
569 | 568 | ||
570 | cpufreq_unregister_governor(&cpufreq_gov_dbs); | 569 | cpufreq_unregister_governor(&cpufreq_gov_conservative); |
571 | } | 570 | } |
572 | 571 | ||
573 | 572 | ||