Commit dccfefd2 authored by Russell King's avatar Russell King

[ARM] Fix ARM suspend-to-RAM.

- Suspend and resume system devices.
- If device suspend fails, don't suspend.
parent 226b6932
......@@ -11,6 +11,7 @@
#include <linux/config.h>
#include <linux/pm.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/errno.h>
#include <linux/sched.h>
......@@ -36,18 +37,25 @@ int suspend(void)
if (ret != 0)
goto out;
device_suspend(3);
ret = device_suspend(3);
if (ret)
goto resume_legacy;
local_irq_disable();
leds_event(led_stop);
sysdev_suspend(3);
ret = pm_do_suspend();
sysdev_resume();
leds_event(led_start);
local_irq_enable();
device_resume();
resume_legacy:
pm_send_all(PM_RESUME, (void *)0);
out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment