summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 14:55:48 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 14:55:48 -0800
commit221dee285ee38099b82437531bcae9fa9cb64cc4 (patch)
tree1f91186091f0256e04c210a8ac76023cdeebf202
parent6f8c480f998a619082f18407f8d7f4c29e94dc6e (diff)
downloadop-kernel-dev-221dee285ee38099b82437531bcae9fa9cb64cc4.zip
op-kernel-dev-221dee285ee38099b82437531bcae9fa9cb64cc4.tar.gz
Revert "[CPUFREQ] constify cpufreq_driver where possible."
This reverts commit aeeddc1435c37fa3fc844f31d39c185b08de4158, which was half-baked and broken. It just resulted in compile errors, since cpufreq_register_driver() still changes the 'driver_data' by setting bits in the flags field. So claiming it is 'const' _really_ doesn't work. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/e_powersaver.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/elanfreq.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/gx-suspmod.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longrun.c4
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k6.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k7.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/sc520_freq.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-ich.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-smi.c2
-rw-r--r--drivers/cpufreq/cpufreq.c4
-rw-r--r--include/linux/cpufreq.h4
14 files changed, 17 insertions, 17 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
index 280b317..0d49d73 100644
--- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
+++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
@@ -373,7 +373,7 @@ static int nforce2_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static const struct cpufreq_driver nforce2_driver = {
+static struct cpufreq_driver nforce2_driver = {
.name = "nforce2",
.verify = nforce2_verify,
.target = nforce2_target,
diff --git a/arch/i386/kernel/cpu/cpufreq/e_powersaver.c b/arch/i386/kernel/cpu/cpufreq/e_powersaver.c
index 8bedaad..f43d98e 100644
--- a/arch/i386/kernel/cpu/cpufreq/e_powersaver.c
+++ b/arch/i386/kernel/cpu/cpufreq/e_powersaver.c
@@ -293,7 +293,7 @@ static struct freq_attr* eps_attr[] = {
NULL,
};
-static const struct cpufreq_driver eps_driver = {
+static struct cpufreq_driver eps_driver = {
.verify = eps_verify,
.target = eps_target,
.init = eps_cpu_init,
diff --git a/arch/i386/kernel/cpu/cpufreq/elanfreq.c b/arch/i386/kernel/cpu/cpufreq/elanfreq.c
index 6905de3..f317276 100644
--- a/arch/i386/kernel/cpu/cpufreq/elanfreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/elanfreq.c
@@ -267,7 +267,7 @@ static struct freq_attr* elanfreq_attr[] = {
};
-static const struct cpufreq_driver elanfreq_driver = {
+static struct cpufreq_driver elanfreq_driver = {
.get = elanfreq_get_cpu_frequency,
.verify = elanfreq_verify,
.target = elanfreq_target,
diff --git a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
index 9a66cab..6667e9c 100644
--- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
+++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
@@ -433,7 +433,7 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
* cpufreq_gx_init:
* MediaGX/Geode GX initialize cpufreq driver
*/
-static const struct cpufreq_driver gx_suspmod_driver = {
+static struct cpufreq_driver gx_suspmod_driver = {
.get = gx_get_cpuspeed,
.verify = cpufreq_gx_verify,
.target = cpufreq_gx_target,
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index 8cc6952..a1f1b71 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -821,7 +821,7 @@ static struct freq_attr* longhaul_attr[] = {
NULL,
};
-static const struct cpufreq_driver longhaul_driver = {
+static struct cpufreq_driver longhaul_driver = {
.verify = longhaul_verify,
.target = longhaul_target,
.get = longhaul_get,
diff --git a/arch/i386/kernel/cpu/cpufreq/longrun.c b/arch/i386/kernel/cpu/cpufreq/longrun.c
index e11fd86..b268951 100644
--- a/arch/i386/kernel/cpu/cpufreq/longrun.c
+++ b/arch/i386/kernel/cpu/cpufreq/longrun.c
@@ -18,7 +18,7 @@
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longrun", msg)
-static const struct cpufreq_driver longrun_driver;
+static struct cpufreq_driver longrun_driver;
/**
* longrun_{low,high}_freq is needed for the conversion of cpufreq kHz
@@ -280,7 +280,7 @@ static int __init longrun_cpu_init(struct cpufreq_policy *policy)
}
-static const struct cpufreq_driver longrun_driver = {
+static struct cpufreq_driver longrun_driver = {
.flags = CPUFREQ_CONST_LOOPS,
.verify = longrun_verify_policy,
.setpolicy = longrun_set_policy,
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
index 2a0d89c..f895240 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
@@ -195,7 +195,7 @@ static struct freq_attr* powernow_k6_attr[] = {
NULL,
};
-static const struct cpufreq_driver powernow_k6_driver = {
+static struct cpufreq_driver powernow_k6_driver = {
.verify = powernow_k6_verify,
.target = powernow_k6_target,
.init = powernow_k6_cpu_init,
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
index d98529c9..837b041 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
@@ -647,7 +647,7 @@ static struct freq_attr* powernow_table_attr[] = {
NULL,
};
-static const struct cpufreq_driver powernow_driver = {
+static struct cpufreq_driver powernow_driver = {
.verify = powernow_verify,
.target = powernow_target,
.get = powernow_get,
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 8ed7b3a..fe3b670 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -1305,7 +1305,7 @@ static struct freq_attr* powernow_k8_attr[] = {
NULL,
};
-static const struct cpufreq_driver cpufreq_amd64_driver = {
+static struct cpufreq_driver cpufreq_amd64_driver = {
.verify = powernowk8_verify,
.target = powernowk8_target,
.init = powernowk8_cpu_init,
diff --git a/arch/i386/kernel/cpu/cpufreq/sc520_freq.c b/arch/i386/kernel/cpu/cpufreq/sc520_freq.c
index eddbe04..b8fb4b5 100644
--- a/arch/i386/kernel/cpu/cpufreq/sc520_freq.c
+++ b/arch/i386/kernel/cpu/cpufreq/sc520_freq.c
@@ -138,7 +138,7 @@ static struct freq_attr* sc520_freq_attr[] = {
};
-static const struct cpufreq_driver sc520_freq_driver = {
+static struct cpufreq_driver sc520_freq_driver = {
.get = sc520_freq_get_cpu_frequency,
.verify = sc520_freq_verify,
.target = sc520_freq_target,
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
index b94e347..b425cd3d1 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
@@ -374,7 +374,7 @@ static struct freq_attr* speedstep_attr[] = {
};
-static const struct cpufreq_driver speedstep_driver = {
+static struct cpufreq_driver speedstep_driver = {
.name = "speedstep-ich",
.verify = speedstep_verify,
.target = speedstep_target,
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
index d4b7404..ff0d898 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
@@ -332,7 +332,7 @@ static struct freq_attr* speedstep_attr[] = {
NULL,
};
-static const struct cpufreq_driver speedstep_driver = {
+static struct cpufreq_driver speedstep_driver = {
.name = "speedstep-smi",
.verify = speedstep_verify,
.target = speedstep_target,
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index a12d6a2..f52facc 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1752,7 +1752,7 @@ static struct notifier_block __cpuinitdata cpufreq_cpu_notifier =
* (and isn't unregistered in the meantime).
*
*/
-int cpufreq_register_driver(const struct cpufreq_driver *driver_data)
+int cpufreq_register_driver(struct cpufreq_driver *driver_data)
{
unsigned long flags;
int ret;
@@ -1817,7 +1817,7 @@ EXPORT_SYMBOL_GPL(cpufreq_register_driver);
* Returns zero if successful, and -EINVAL if the cpufreq_driver is
* currently not initialised.
*/
-int cpufreq_unregister_driver(const struct cpufreq_driver *driver)
+int cpufreq_unregister_driver(struct cpufreq_driver *driver)
{
unsigned long flags;
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 3a25235..0899e2c 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -225,8 +225,8 @@ struct cpufreq_driver {
#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
* mismatches */
-int cpufreq_register_driver(const struct cpufreq_driver *driver_data);
-int cpufreq_unregister_driver(const struct cpufreq_driver *driver_data);
+int cpufreq_register_driver(struct cpufreq_driver *driver_data);
+int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);
OpenPOWER on IntegriCloud