[PATCH] kernel/power/disk.c trivial cleanups

From: Todd Poynor
Date: Thu Mar 03 2005 - 18:21:18 EST


* Remove duplicate include.

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

Signed-off-by: Todd Poynor <tpoynor@xxxxxxxxxx>

--- 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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/