]> git.hungrycats.org Git - linux/commitdiff
[CPUFREQ] Warning fixes.
authorDave Jones <davej@redhat.com>
Mon, 10 May 2004 13:02:16 +0000 (14:02 +0100)
committerDave Jones <davej@delerium.codemonkey.org.uk>
Mon, 10 May 2004 13:02:16 +0000 (14:02 +0100)
On sparc64:

drivers/cpufreq/cpufreq.c: In function `cpufreq_add_dev':
drivers/cpufreq/cpufreq.c:394: warning: cast to pointer from integer of different size
drivers/cpufreq/cpufreq.c: In function `handle_update':
drivers/cpufreq/cpufreq.c:507: warning: cast from pointer to integer of different size

drivers/cpufreq/cpufreq.c

index 912ce70348da321ef90cd51e5609433b44af0468..dd201000a503825c7004366af3a4d6cfe981ac8a 100644 (file)
@@ -391,7 +391,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
        policy->cpu = cpu;
        init_MUTEX_LOCKED(&policy->lock);
        init_completion(&policy->kobj_unregister);
-       INIT_WORK(&policy->update, handle_update, (void *) cpu);
+       INIT_WORK(&policy->update, handle_update, (void *)(long)cpu);
 
        /* call driver. From then on the cpufreq must be able
         * to accept all calls to ->verify and ->setpolicy for this CPU
@@ -504,7 +504,7 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
 
 static void handle_update(void *data)
 {
-       unsigned int cpu = (unsigned int) data;
+       unsigned int cpu = (unsigned int)(long)data;
        cpufreq_update_policy(cpu);
 }