aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
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 361e204209eb..75ce8711bca5 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -17,6 +17,8 @@
17#include <linux/bootmem.h> 17#include <linux/bootmem.h>
18#include <linux/err.h> 18#include <linux/err.h>
19 19
20#include "base.h"
21
20struct device platform_bus = { 22struct device platform_bus = {
21 .bus_id = "platform", 23 .bus_id = "platform",
22}; 24};
@@ -279,13 +281,9 @@ static int platform_suspend(struct device * dev, pm_message_t state)
279{ 281{
280 int ret = 0; 282 int ret = 0;
281 283
282 if (dev->driver && dev->driver->suspend) { 284 if (dev->driver && dev->driver->suspend)
283 ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE); 285 ret = dev->driver->suspend(dev, state);
284 if (ret == 0) 286
285 ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE);
286 if (ret == 0)
287 ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);
288 }
289 return ret; 287 return ret;
290} 288}
291 289
@@ -293,13 +291,9 @@ static int platform_resume(struct device * dev)
293{ 291{
294 int ret = 0; 292 int ret = 0;
295 293
296 if (dev->driver && dev->driver->resume) { 294 if (dev->driver && dev->driver->resume)
297 ret = dev->driver->resume(dev, RESUME_POWER_ON); 295 ret = dev->driver->resume(dev);
298 if (ret == 0) 296
299 ret = dev->driver->resume(dev, RESUME_RESTORE_STATE);
300 if (ret == 0)
301 ret = dev->driver->resume(dev, RESUME_ENABLE);
302 }
303 return ret; 297 return ret;
304} 298}
305 299