diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 21:32:01 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 21:32:01 -0400 |
| commit | 5615ca7906aefbdc3318604c89db5931d0a25910 (patch) | |
| tree | c34bcc7e314f49005ad88ac84c908128729c0329 /drivers/base/platform.c | |
| parent | 7a9f8f93d2dad38f30fbc79d8a1e6517373aa4b6 (diff) | |
| parent | 9dfb7808fb05643b0d06df7411b94d9546696bf1 (diff) | |
Merge branch 'upstream'
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 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 | |||
| 20 | struct device platform_bus = { | 22 | struct 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 | ||
