2005-03-03 23:16:56

by Todd Poynor

[permalink] [raw]
Subject: [PATCH] kernel/power/disk.c trivial cleanups

* Remove duplicate include.

* Avoid "mode set to ''" message when error updating /sys/power/disk.

Signed-off-by: Todd Poynor <[email protected]>

--- linux-2.6.11-rc4-orig/kernel/power/disk.c 2005-02-23 09:47:03.000000000 -0800
+++ linux-2.6.11-rc4-pm/kernel/power/disk.c 2005-03-03 05:00:18.609860968 -0800
@@ -16,7 +16,6 @@
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/fs.h>
-#include <linux/device.h>
#include "power.h"


@@ -321,8 +320,9 @@
} else
error = -EINVAL;

- pr_debug("PM: suspend-to-disk mode set to '%s'\n",
- pm_disk_modes[mode]);
+ if (mode == pm_disk_mode)
+ pr_debug("PM: suspend-to-disk mode set to '%s'\n",
+ pm_disk_modes[mode]);
up(&pm_sem);
return error ? error : n;
}


2005-03-04 09:20:35

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] kernel/power/disk.c trivial cleanups

Hi!

> * Remove duplicate include.
>
> * Avoid "mode set to ''" message when error updating /sys/power/disk.
>
> Signed-off-by: Todd Poynor <[email protected]>

Duplicate remove killed, thanks. I do not think debugging print
requires that much care...
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

2005-03-04 17:21:03

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [PATCH] kernel/power/disk.c trivial cleanups

Pavel Machek wrote:

> Duplicate remove killed, thanks. I do not think debugging print
> requires that much care...

I think it does. I tried s4bios ("firmware" mode) on hp 4150 today and
wondered why it said "mode set to firmware" but in fact did not do it.
You'll get a complete report for this later ;-)

Stefan