summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDominik Brodowski <linux@brodo.de>2002-11-21 19:06:16 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-11-21 19:06:16 -0800
commit0c7eef6a3c19cb2d31dc4c1d468e5f429aff0aed (patch)
tree35bf5670f0c0fac17ade365ad788ef801d93f81f /include
parent645e448cd42b611ad1ed24a38efff6c667a4a658 (diff)
[PATCH] cpufreq: cleanups
This changes the return type of the verify and setpolicy functions from void to int. While doing this, I've changed the values for minimum and maximum supported frequency to be per CPU, as UltraSPARC needs this. Additionally, small cleanups in various drivers.
Diffstat (limited to 'include')
-rw-r--r--include/linux/cpufreq.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index a5aa299cf92c..a8f8d2a31936 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -5,7 +5,7 @@
* (C) 2002 Dominik Brodowski <linux@brodo.de>
*
*
- * $Id: cpufreq.h,v 1.27 2002/10/08 14:54:23 db Exp $
+ * $Id: cpufreq.h,v 1.29 2002/11/11 15:35:47 db Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -104,7 +104,7 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu
* CPUFREQ DRIVER INTERFACE *
*********************************************************************/
-typedef void (*cpufreq_policy_t) (struct cpufreq_policy *policy);
+typedef int (*cpufreq_policy_t) (struct cpufreq_policy *policy);
struct cpufreq_driver {
/* needed by all drivers */
@@ -116,7 +116,7 @@ struct cpufreq_driver {
#endif
/* 2.4. compatible API */
#ifdef CONFIG_CPU_FREQ_24_API
- unsigned int cpu_min_freq;
+ unsigned int cpu_min_freq[NR_CPUS];
unsigned int cpu_cur_freq[NR_CPUS];
#endif
};
@@ -205,19 +205,19 @@ enum {
CPU_NR_FREQ = 3,
};
-#define CTL_CPU_VARS_SPEED_MAX { \
+#define CTL_CPU_VARS_SPEED_MAX(cpunr) { \
.ctl_name = CPU_NR_FREQ_MAX, \
- .data = &cpu_max_freq, \
+ .data = &cpu_max_freq[cpunr], \
.procname = "speed-max", \
- .maxlen = sizeof(cpu_max_freq),\
+ .maxlen = sizeof(cpu_max_freq[cpunr]),\
.mode = 0444, \
.proc_handler = proc_dointvec, }
-#define CTL_CPU_VARS_SPEED_MIN { \
+#define CTL_CPU_VARS_SPEED_MIN(cpunr) { \
.ctl_name = CPU_NR_FREQ_MIN, \
- .data = &cpu_min_freq, \
+ .data = &cpu_min_freq[cpunr], \
.procname = "speed-min", \
- .maxlen = sizeof(cpu_min_freq),\
+ .maxlen = sizeof(cpu_min_freq[cpunr]),\
.mode = 0444, \
.proc_handler = proc_dointvec, }
@@ -230,8 +230,8 @@ enum {
.extra1 = (void*) (cpunr), }
#define CTL_TABLE_CPU_VARS(cpunr) static ctl_table ctl_cpu_vars_##cpunr[] = {\
- CTL_CPU_VARS_SPEED_MAX, \
- CTL_CPU_VARS_SPEED_MIN, \
+ CTL_CPU_VARS_SPEED_MAX(cpunr), \
+ CTL_CPU_VARS_SPEED_MIN(cpunr), \
CTL_CPU_VARS_SPEED(cpunr), \
{ .ctl_name = 0, }, }