diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 23:39:24 +0300 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 23:39:24 +0300 |
commit | 7211bb9b64f17b23834d91fc3d0c1d78671ee9a8 (patch) | |
tree | 541909f86c31fee97cd70d28ec2fe5c23e1ceb02 /drivers/base/platform.c | |
parent | f1e691a24955ea987f021f378324fb5003b1b208 (diff) | |
parent | 70d9d825e0a5a78ec1dacaaaf5c72ff5b0206fab (diff) | |
download | linux-7211bb9b64f17b23834d91fc3d0c1d78671ee9a8.tar.xz |
Merge branch 'master'
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 361e204209eb..d597c922af11 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -10,12 +10,15 @@ * information. */ -#include <linux/device.h> +#include <linux/platform_device.h> #include <linux/module.h> #include <linux/init.h> #include <linux/dma-mapping.h> #include <linux/bootmem.h> #include <linux/err.h> +#include <linux/slab.h> + +#include "base.h" struct device platform_bus = { .bus_id = "platform", @@ -279,13 +282,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 +292,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; } |