aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/power/suspend.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-14 17:07:57 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-14 17:07:57 -0700
commit754a264c42178b85125a071299bb900b615c853b (patch)
tree8cfc6d85e6725f90672b75314064ead9fd62e3c6 /drivers/base/power/suspend.c
parentf9814802dfec8feaf51ba873d7eac1a05ee65842 (diff)
parent4f705ae3e94ffaafe8d35f71ff4d5c499bb06814 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (158 commits) commit 4f705ae3e94ffaafe8d35f71ff4d5c499bb06814 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Apr 3 17:09:22 2006 -0700 [PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/ dmi_scan.c is arch-independent and is used by i386, x86_64, and ia64. Currently all three arches compile it from arch/i386, which means that ia64 and x86_64 depend on things in arch/i386 that they wouldn't otherwise care about. This is simply "mv arch/i386/kernel/dmi_scan.c drivers/firmware/" (removing trailing whitespace) and the associated Makefile changes. All three architectures already set CONFIG_DMI in their top-level Kconfig files. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Andi Kleen <ak@muc.de> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andrey Panin <pazke@orbita1.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> ...
Diffstat (limited to 'drivers/base/power/suspend.c')
-rw-r--r--drivers/base/power/suspend.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index bdb60663f2e..662209d3f42 100644
--- a/drivers/base/power/suspend.c
+++ b/drivers/base/power/suspend.c
@@ -10,6 +10,8 @@
#include <linux/vt_kern.h>
#include <linux/device.h>
+#include <linux/kallsyms.h>
+#include <linux/pm.h>
#include "../base.h"
#include "power.h"
@@ -58,6 +60,7 @@ int suspend_device(struct device * dev, pm_message_t state)
if (dev->bus && dev->bus->suspend && !dev->power.power_state.event) {
dev_dbg(dev, "suspending\n");
error = dev->bus->suspend(dev, state);
+ suspend_report_result(dev->bus->suspend, error);
}
up(&dev->sem);
return error;
@@ -169,3 +172,12 @@ int device_power_down(pm_message_t state)
EXPORT_SYMBOL_GPL(device_power_down);
+void __suspend_report_result(const char *function, void *fn, int ret)
+{
+ if (ret) {
+ printk(KERN_ERR "%s(): ", function);
+ print_fn_descriptor_symbol("%s() returns ", (unsigned long)fn);
+ printk("%d\n", ret);
+ }
+}
+EXPORT_SYMBOL_GPL(__suspend_report_result);