Skip to contentSkip to conversation

via-mpu: compile without Power Management support

PATCH In review Kristian Mueller 3 participants 4 messages Dec 15, 2005 Linux for power macintosh

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 via-mpu: compile without Power Management support

Don't check for sleep_in_progress if there is no
Power Management support.

drivers/macintosh/via-pmu.c renamed from drivers/macintosh/via-pmu.c.orig +4 -0
@@ -2911,8 +2911,10 @@ pmu_ioctl(struct inode * inode, struct f
 	 * the fbdev
 	 */
 	case PMU_IOC_GET_BACKLIGHT:
+#if defined(CONFIG_PM) && defined(CONFIG_PPC32)	   
 		if (sleep_in_progress)
 			return -EBUSY;
+#endif /* CONFIG_PM && CONFIG_PPC32 */
 		error = get_backlight_level();
 		if (error < 0)
 			return error;
@@ -2920,8 +2922,10 @@ pmu_ioctl(struct inode * inode, struct f
 	case PMU_IOC_SET_BACKLIGHT:
 	{
 		__u32 value;
+#if defined(CONFIG_PM) && defined(CONFIG_PPC32)	   
 		if (sleep_in_progress)
 			return -EBUSY;
+#endif /* CONFIG_PM && CONFIG_PPC32 */
 		error = get_user(value, argp);
 		if (!error)
 			error = set_backlight_level(value);
#1 lore raw
Quoted 2 lines · Kristian Mueller

Don't check for sleep_in_progress if there is no
Power Management support.

Creeping #ifdeffing, not good.

Please move the sleep_in_progress variable outside of #ifdef where it's defined instead, it will default to 0 and never trigger, but things will still build.

-Olof

#2 lore raw
Quoted 3 lines

Please move the sleep_in_progress variable outside of #ifdef where it's defined instead, it will default to 0 and never trigger, but things will still build.

Okay good point, done.

Fix compilation of via-mpu.c without Power Management support.

Regards,
Kristian

drivers/macintosh/via-pmu.c renamed from drivers/macintosh/via-pmu.c.orig +1 -1
@@ -157,8 +157,8 @@ static int pmu_version;
 static int drop_interrupts;
 #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
 static int option_lid_wakeup = 1;
-static int sleep_in_progress;
 #endif /* CONFIG_PM && CONFIG_PPC32 */
+static int sleep_in_progress;
 static unsigned long async_req_locks;
 static unsigned int pmu_irq_stats[11];
 
#3 lore raw
Quoted 1 line · Kristian Mueller

Fix compilation of via-mpu.c without Power Management support.

I'll take this without a Signed-off-by line this time, since it's pretty trivial, but in general please include a Signed-off-by line (see Documentation/SubmittingPatches for what that is).

Paul.