Skip to contentSkip to conversation

: cpufreq: Fix u32 vs pm_message_t confusion

PATCH New Bernard Blackham 1 participant 1 message Jun 22, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : cpufreq: Fix u32 vs pm_message_t confusion

Hi Dave,

With the new pm_message_t being introduced into the driver model, cpufreq needs to be updated. As cpufreq doesn't actually look at the state passed to the suspend() function, this patch doesn't change any code, just declarations. It applies against 2.6.12.

Patches that switch the pm_message_t to a struct will soon be stirring in -mm, so it really just fixes a future compilation bug :)

Thanks,

Bernard.

Fix u32 vs pm_message_t confusion in cpufreq.

drivers/cpufreq/cpufreq.c +2 -2
Index: linux-2.6.12-brb/drivers/cpufreq/cpufreq.c
===================================================================
@@ -869,7 +869,7 @@
  *	cpufreq_suspend - let the low level driver prepare for suspend
  */
 
-static int cpufreq_suspend(struct sys_device * sysdev, u32 state)
+static int cpufreq_suspend(struct sys_device * sysdev, pm_message_t pmsg)
 {
 	int cpu = sysdev->id;
 	unsigned int ret = 0;
@@ -897,7 +897,7 @@
 	}
 
 	if (cpufreq_driver->suspend) {
-		ret = cpufreq_driver->suspend(cpu_policy, state);
+		ret = cpufreq_driver->suspend(cpu_policy, pmsg);
 		if (ret) {
 			printk(KERN_ERR "cpufreq: suspend failed in ->suspend "
 					"step on CPU %u\n", cpu_policy->cpu);
include/linux/cpufreq.h +1 -1
Index: linux-2.6.12-brb/include/linux/cpufreq.h
===================================================================
@@ -201,7 +201,7 @@
 
 	/* optional */
 	int	(*exit)		(struct cpufreq_policy *policy);
-	int	(*suspend)	(struct cpufreq_policy *policy, u32 state);
+	int	(*suspend)	(struct cpufreq_policy *policy, pm_message_t pmsg);
 	int	(*resume)	(struct cpufreq_policy *policy);
 	struct freq_attr	**attr;
 };
arch/ppc/platforms/pmac_cpufreq.c +1 -1
Index: linux-2.6.12-brb/arch/ppc/platforms/pmac_cpufreq.c
===================================================================
@@ -452,7 +452,7 @@
 	return offset;
 }
 
-static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, u32 state)
+static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, pm_message_t pmsg)
 {
 	/* Ok, this could be made a bit smarter, but let's be robust for now. We
 	 * always force a speed change to high speed before sleep, to make sure