Commit ad2ba7e6 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Fix broken cast.

This breaks on x86-64 with the following warning.

drivers/cpufreq/cpufreq_userspace.c: In function `cpufreq_procctl':
drivers/cpufreq/cpufreq_userspace.c:170: warning: cast from pointer to integer of different size
drivers/cpufreq/cpufreq_userspace.c: In function `cpufreq_sysctl':
drivers/cpufreq/cpufreq_userspace.c:208: warning: cast from pointer to integer of different size
parent 763cd576
......@@ -167,7 +167,7 @@ cpufreq_procctl(ctl_table *ctl, int write, struct file *filp,
void __user *buffer, size_t *lenp)
{
char buf[16], *p;
int cpu = (int) ctl->extra1;
int cpu = (long) ctl->extra1;
int len, left = *lenp;
if (!left || (filp->f_pos && !write) || !cpu_online(cpu)) {
......@@ -205,7 +205,7 @@ cpufreq_sysctl(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context)
{
int cpu = (int) table->extra1;
int cpu = (long) table->extra1;
if (!cpu_online(cpu))
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment