diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq_conservative.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 526bfbf69611..94284c8473b1 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -81,8 +81,6 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */ | |||
81 | */ | 81 | */ |
82 | static DEFINE_MUTEX(dbs_mutex); | 82 | static DEFINE_MUTEX(dbs_mutex); |
83 | 83 | ||
84 | static struct workqueue_struct *kconservative_wq; | ||
85 | |||
86 | static struct dbs_tuners { | 84 | static struct dbs_tuners { |
87 | unsigned int sampling_rate; | 85 | unsigned int sampling_rate; |
88 | unsigned int sampling_down_factor; | 86 | unsigned int sampling_down_factor; |
@@ -560,7 +558,7 @@ static void do_dbs_timer(struct work_struct *work) | |||
560 | 558 | ||
561 | dbs_check_cpu(dbs_info); | 559 | dbs_check_cpu(dbs_info); |
562 | 560 | ||
563 | queue_delayed_work_on(cpu, kconservative_wq, &dbs_info->work, delay); | 561 | schedule_delayed_work_on(cpu, &dbs_info->work, delay); |
564 | mutex_unlock(&dbs_info->timer_mutex); | 562 | mutex_unlock(&dbs_info->timer_mutex); |
565 | } | 563 | } |
566 | 564 | ||
@@ -572,8 +570,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) | |||
572 | 570 | ||
573 | dbs_info->enable = 1; | 571 | dbs_info->enable = 1; |
574 | INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer); | 572 | INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer); |
575 | queue_delayed_work_on(dbs_info->cpu, kconservative_wq, &dbs_info->work, | 573 | schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay); |
576 | delay); | ||
577 | } | 574 | } |
578 | 575 | ||
579 | static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) | 576 | static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) |
@@ -716,25 +713,12 @@ struct cpufreq_governor cpufreq_gov_conservative = { | |||
716 | 713 | ||
717 | static int __init cpufreq_gov_dbs_init(void) | 714 | static int __init cpufreq_gov_dbs_init(void) |
718 | { | 715 | { |
719 | int err; | 716 | return cpufreq_register_governor(&cpufreq_gov_conservative); |
720 | |||
721 | kconservative_wq = create_workqueue("kconservative"); | ||
722 | if (!kconservative_wq) { | ||
723 | printk(KERN_ERR "Creation of kconservative failed\n"); | ||
724 | return -EFAULT; | ||
725 | } | ||
726 | |||
727 | err = cpufreq_register_governor(&cpufreq_gov_conservative); | ||
728 | if (err) | ||
729 | destroy_workqueue(kconservative_wq); | ||
730 | |||
731 | return err; | ||
732 | } | 717 | } |
733 | 718 | ||
734 | static void __exit cpufreq_gov_dbs_exit(void) | 719 | static void __exit cpufreq_gov_dbs_exit(void) |
735 | { | 720 | { |
736 | cpufreq_unregister_governor(&cpufreq_gov_conservative); | 721 | cpufreq_unregister_governor(&cpufreq_gov_conservative); |
737 | destroy_workqueue(kconservative_wq); | ||
738 | } | 722 | } |
739 | 723 | ||
740 | 724 | ||