diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-10-28 15:50:51 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-10-28 15:50:51 -0700 |
commit | a4da0628efd788eb199dd9df225e296035ec2539 (patch) | |
tree | 1e611030c993e1480dc2f07f26976d2d33002b0d /drivers/base/platform.c | |
parent | 70a30e16a8a9d22396a4d1e96af86e43594df584 (diff) | |
parent | 20731945ae743034353a88c307920d1f16cf8ac8 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 22 |
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; } |