aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 13:09:47 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 13:09:47 -0700
commit84860bf0644d7c45afe7ddbd30731c3e3c371fae (patch)
treed6c4b98a9c3fd9981e7fcc5d7729c9e01e327767 /drivers/base/platform.c
parent8caf89157d64f1eedba37113afb4b303b2b3e301 (diff)
parent6fbfddcb52d8d9fa2cd209f5ac2a1c87497d55b5 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 361e204209e..75ce8711bca 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -17,6 +17,8 @@
#include <linux/bootmem.h>
#include <linux/err.h>
+#include "base.h"
+
struct device platform_bus = {
.bus_id = "platform",
};
@@ -279,13 +281,9 @@ static int platform_suspend(struct device * dev, pm_message_t state)
{
int ret = 0;
- if (dev->driver && dev->driver->suspend) {
- ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE);
- if (ret == 0)
- ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE);
- if (ret == 0)
- ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);
- }
+ if (dev->driver && dev->driver->suspend)
+ ret = dev->driver->suspend(dev, state);
+
return ret;
}
@@ -293,13 +291,9 @@ static int platform_resume(struct device * dev)
{
int ret = 0;
- if (dev->driver && dev->driver->resume) {
- ret = dev->driver->resume(dev, RESUME_POWER_ON);
- if (ret == 0)
- ret = dev->driver->resume(dev, RESUME_RESTORE_STATE);
- if (ret == 0)
- ret = dev->driver->resume(dev, RESUME_ENABLE);
- }
+ if (dev->driver && dev->driver->resume)
+ ret = dev->driver->resume(dev);
+
return ret;
}