mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Revert "[CPUFREQ] constify cpufreq_driver where possible."
This reverts commit aeeddc1435
, 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>
This commit is contained in:
parent
6f8c480f99
commit
221dee285e
14 changed files with 17 additions and 17 deletions
|
@ -373,7 +373,7 @@ static int nforce2_cpu_exit(struct cpufreq_policy *policy)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct cpufreq_driver nforce2_driver = {
|
static struct cpufreq_driver nforce2_driver = {
|
||||||
.name = "nforce2",
|
.name = "nforce2",
|
||||||
.verify = nforce2_verify,
|
.verify = nforce2_verify,
|
||||||
.target = nforce2_target,
|
.target = nforce2_target,
|
||||||
|
|
|
@ -293,7 +293,7 @@ static struct freq_attr* eps_attr[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct cpufreq_driver eps_driver = {
|
static struct cpufreq_driver eps_driver = {
|
||||||
.verify = eps_verify,
|
.verify = eps_verify,
|
||||||
.target = eps_target,
|
.target = eps_target,
|
||||||
.init = eps_cpu_init,
|
.init = eps_cpu_init,
|
||||||
|
|
|
@ -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,
|
.get = elanfreq_get_cpu_frequency,
|
||||||
.verify = elanfreq_verify,
|
.verify = elanfreq_verify,
|
||||||
.target = elanfreq_target,
|
.target = elanfreq_target,
|
||||||
|
|
|
@ -433,7 +433,7 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
|
||||||
* cpufreq_gx_init:
|
* cpufreq_gx_init:
|
||||||
* MediaGX/Geode GX initialize cpufreq driver
|
* 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,
|
.get = gx_get_cpuspeed,
|
||||||
.verify = cpufreq_gx_verify,
|
.verify = cpufreq_gx_verify,
|
||||||
.target = cpufreq_gx_target,
|
.target = cpufreq_gx_target,
|
||||||
|
|
|
@ -821,7 +821,7 @@ static struct freq_attr* longhaul_attr[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct cpufreq_driver longhaul_driver = {
|
static struct cpufreq_driver longhaul_driver = {
|
||||||
.verify = longhaul_verify,
|
.verify = longhaul_verify,
|
||||||
.target = longhaul_target,
|
.target = longhaul_target,
|
||||||
.get = longhaul_get,
|
.get = longhaul_get,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longrun", msg)
|
#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
|
* 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,
|
.flags = CPUFREQ_CONST_LOOPS,
|
||||||
.verify = longrun_verify_policy,
|
.verify = longrun_verify_policy,
|
||||||
.setpolicy = longrun_set_policy,
|
.setpolicy = longrun_set_policy,
|
||||||
|
|
|
@ -195,7 +195,7 @@ static struct freq_attr* powernow_k6_attr[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct cpufreq_driver powernow_k6_driver = {
|
static struct cpufreq_driver powernow_k6_driver = {
|
||||||
.verify = powernow_k6_verify,
|
.verify = powernow_k6_verify,
|
||||||
.target = powernow_k6_target,
|
.target = powernow_k6_target,
|
||||||
.init = powernow_k6_cpu_init,
|
.init = powernow_k6_cpu_init,
|
||||||
|
|
|
@ -647,7 +647,7 @@ static struct freq_attr* powernow_table_attr[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct cpufreq_driver powernow_driver = {
|
static struct cpufreq_driver powernow_driver = {
|
||||||
.verify = powernow_verify,
|
.verify = powernow_verify,
|
||||||
.target = powernow_target,
|
.target = powernow_target,
|
||||||
.get = powernow_get,
|
.get = powernow_get,
|
||||||
|
|
|
@ -1305,7 +1305,7 @@ static struct freq_attr* powernow_k8_attr[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct cpufreq_driver cpufreq_amd64_driver = {
|
static struct cpufreq_driver cpufreq_amd64_driver = {
|
||||||
.verify = powernowk8_verify,
|
.verify = powernowk8_verify,
|
||||||
.target = powernowk8_target,
|
.target = powernowk8_target,
|
||||||
.init = powernowk8_cpu_init,
|
.init = powernowk8_cpu_init,
|
||||||
|
|
|
@ -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,
|
.get = sc520_freq_get_cpu_frequency,
|
||||||
.verify = sc520_freq_verify,
|
.verify = sc520_freq_verify,
|
||||||
.target = sc520_freq_target,
|
.target = sc520_freq_target,
|
||||||
|
|
|
@ -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",
|
.name = "speedstep-ich",
|
||||||
.verify = speedstep_verify,
|
.verify = speedstep_verify,
|
||||||
.target = speedstep_target,
|
.target = speedstep_target,
|
||||||
|
|
|
@ -332,7 +332,7 @@ static struct freq_attr* speedstep_attr[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct cpufreq_driver speedstep_driver = {
|
static struct cpufreq_driver speedstep_driver = {
|
||||||
.name = "speedstep-smi",
|
.name = "speedstep-smi",
|
||||||
.verify = speedstep_verify,
|
.verify = speedstep_verify,
|
||||||
.target = speedstep_target,
|
.target = speedstep_target,
|
||||||
|
|
|
@ -1752,7 +1752,7 @@ static struct notifier_block __cpuinitdata cpufreq_cpu_notifier =
|
||||||
* (and isn't unregistered in the meantime).
|
* (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;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1817,7 +1817,7 @@ EXPORT_SYMBOL_GPL(cpufreq_register_driver);
|
||||||
* Returns zero if successful, and -EINVAL if the cpufreq_driver is
|
* Returns zero if successful, and -EINVAL if the cpufreq_driver is
|
||||||
* currently not initialised.
|
* currently not initialised.
|
||||||
*/
|
*/
|
||||||
int cpufreq_unregister_driver(const struct cpufreq_driver *driver)
|
int cpufreq_unregister_driver(struct cpufreq_driver *driver)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
|
|
@ -225,8 +225,8 @@ struct cpufreq_driver {
|
||||||
#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
|
#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
|
||||||
* mismatches */
|
* mismatches */
|
||||||
|
|
||||||
int cpufreq_register_driver(const struct cpufreq_driver *driver_data);
|
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
|
||||||
int cpufreq_unregister_driver(const 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);
|
void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);
|
||||||
|
|
Loading…
Reference in a new issue