Commit f60e230f6be5672241e48434a6c2a417d9674d42

Authored by Viresh Kumar
Committed by Rafael J. Wysocki
1 parent d7c7f10326

cpuidle: remove cpuidle_unregister_governor()

cpuidle_unregister_governor() and cpuidle_replace_governor() aren't
used anymore and can be removed. They were used by cpufreq governors
earlier, but since the governors can't be compiled as modules any
more, these two functions aren't necessary.

Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Showing 3 changed files with 0 additions and 50 deletions Side-by-side Diff

Documentation/cpuidle/governor.txt
... ... @@ -25,6 +25,5 @@
25 25  
26 26 Interfaces:
27 27 extern int cpuidle_register_governor(struct cpuidle_governor *gov);
28   -extern void cpuidle_unregister_governor(struct cpuidle_governor *gov);
29 28 struct cpuidle_governor
drivers/cpuidle/governor.c
... ... @@ -96,46 +96,4 @@
96 96  
97 97 return ret;
98 98 }
99   -
100   -/**
101   - * cpuidle_replace_governor - find a replacement governor
102   - * @exclude_rating: the rating that will be skipped while looking for
103   - * new governor.
104   - */
105   -static struct cpuidle_governor *cpuidle_replace_governor(int exclude_rating)
106   -{
107   - struct cpuidle_governor *gov;
108   - struct cpuidle_governor *ret_gov = NULL;
109   - unsigned int max_rating = 0;
110   -
111   - list_for_each_entry(gov, &cpuidle_governors, governor_list) {
112   - if (gov->rating == exclude_rating)
113   - continue;
114   - if (gov->rating > max_rating) {
115   - max_rating = gov->rating;
116   - ret_gov = gov;
117   - }
118   - }
119   -
120   - return ret_gov;
121   -}
122   -
123   -/**
124   - * cpuidle_unregister_governor - unregisters a governor
125   - * @gov: the governor
126   - */
127   -void cpuidle_unregister_governor(struct cpuidle_governor *gov)
128   -{
129   - if (!gov)
130   - return;
131   -
132   - mutex_lock(&cpuidle_lock);
133   - if (gov == cpuidle_curr_governor) {
134   - struct cpuidle_governor *new_gov;
135   - new_gov = cpuidle_replace_governor(gov->rating);
136   - cpuidle_switch_governor(new_gov);
137   - }
138   - list_del(&gov->governor_list);
139   - mutex_unlock(&cpuidle_lock);
140   -}
include/linux/cpuidle.h
... ... @@ -195,16 +195,10 @@
195 195 };
196 196  
197 197 #ifdef CONFIG_CPU_IDLE
198   -
199 198 extern int cpuidle_register_governor(struct cpuidle_governor *gov);
200   -extern void cpuidle_unregister_governor(struct cpuidle_governor *gov);
201   -
202 199 #else
203   -
204 200 static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
205 201 {return 0;}
206   -static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { }
207   -
208 202 #endif
209 203  
210 204 #ifdef CONFIG_ARCH_HAS_CPU_RELAX