Skip to contentSkip to conversation

small cpufreq cleanup

PATCH In review Adrian Bunk 2 participants 2 messages Oct 30, 2004 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 small cpufreq cleanup

the patch below does the following cleanups in the cpufreq code:
- remove the __deprecated cpufreq_set{,max} functions that didn't have any users left
- make cpufreq_gov_dbs static

cpufreq_driver_target and cpufreq_governor in drivers/cpufreq/cpufreq.c also both have currently exactly zero in-kernel users, but I left them.

diffstat output:

 drivers/cpufreq/cpufreq_ondemand.c  |    3 +--
 drivers/cpufreq/cpufreq_userspace.c |   21 ---------------------
 include/linux/cpufreq.h             |    3 ---
 3 files changed, 1 insertion(+), 26 deletions(-)
include/linux/cpufreq.h renamed from include/linux/cpufreq.h.old +0 -3
@@ -261,9 +261,6 @@
  *********************************************************************/
 #ifdef CONFIG_CPU_FREQ_24_API
 
-int __deprecated cpufreq_setmax(unsigned int cpu);
-int __deprecated cpufreq_set(unsigned int kHz, unsigned int cpu);
-
 
 /* /proc/sys/cpu */
 enum {
drivers/cpufreq/cpufreq_userspace.c renamed from drivers/cpufreq/cpufreq_userspace.c.old +0 -21
@@ -141,27 +141,6 @@
 
 static unsigned int warning_print = 0;
 
-int __deprecated cpufreq_set(unsigned int freq, unsigned int cpu)
-{
-	return _cpufreq_set(freq, cpu);
-}
-EXPORT_SYMBOL_GPL(cpufreq_set);
-
-
-/** 
- * cpufreq_setmax - set the CPU to the maximum frequency
- * @cpu - affected cpu;
- *
- * Sets the CPU frequency to the maximum frequency supported by
- * this CPU.
- */
-int __deprecated cpufreq_setmax(unsigned int cpu)
-{
-	if (!cpu_is_managed[cpu] || !cpu_online(cpu))
-		return -EINVAL;
-	return _cpufreq_set(cpu_max_freq[cpu], cpu);
-}
-EXPORT_SYMBOL_GPL(cpufreq_setmax);
 
 /*********************** cpufreq_sysctl interface ********************/
 static int
drivers/cpufreq/cpufreq_ondemand.c renamed from drivers/cpufreq/cpufreq_ondemand.c.old +1 -2
@@ -410,12 +410,11 @@
 	return 0;
 }
 
-struct cpufreq_governor cpufreq_gov_dbs = {
+static struct cpufreq_governor cpufreq_gov_dbs = {
 	.name		= "ondemand",
 	.governor	= cpufreq_governor_dbs,
 	.owner		= THIS_MODULE,
 };
-EXPORT_SYMBOL(cpufreq_gov_dbs);
 
 static int __init cpufreq_gov_dbs_init(void)
 {
#1 lore raw
Quoted 3 lines · Adrian Bunk

the patch below does the following cleanups in the cpufreq code:
- remove the __deprecated cpufreq_set{,max} functions that didn't have any users left

Not yet, the #warning says it'll be removed 2005-01-01.

Quoted 1 line

- make cpufreq_gov_dbs static

Patch which does that is already in cpufreq-bk.

Quoted 2 lines

cpufreq_driver_target and cpufreq_governor in drivers/cpufreq/cpufreq.c also both have currently exactly zero in-kernel users, but I left them.

cpufreq_driver_target and/or cpufreq_governor should already be used by some code, but aren't yet, but definitely will be useful and used soon.

Dominik