diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 19:46:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 19:46:07 -0400 |
commit | 51509a283a908d73b20371addc67ee3ae7189934 (patch) | |
tree | bb920f09799cc47d496f26f7deb78a315351150d /arch/blackfin | |
parent | 75f5076b12924f53340209d2cde73b98ed3b3095 (diff) | |
parent | 6538df80194e305f1b78cafb556f4bb442f808b3 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: (34 commits)
PM: Introduce generic prepare and complete callbacks for subsystems
PM: Allow drivers to allocate memory from .prepare() callbacks safely
PM: Remove CONFIG_PM_VERBOSE
Revert "PM / Hibernate: Reduce autotuned default image size"
PM / Hibernate: Add sysfs knob to control size of memory for drivers
PM / Wakeup: Remove useless synchronize_rcu() call
kmod: always provide usermodehelper_disable()
PM / ACPI: Remove acpi_sleep=s4_nonvs
PM / Wakeup: Fix build warning related to the "wakeup" sysfs file
PM: Print a warning if firmware is requested when tasks are frozen
PM / Runtime: Rework runtime PM handling during driver removal
Freezer: Use SMP barriers
PM / Suspend: Do not ignore error codes returned by suspend_enter()
PM: Fix build issue in clock_ops.c for CONFIG_PM_RUNTIME unset
PM: Revert "driver core: platform_bus: allow runtime override of dev_pm_ops"
OMAP1 / PM: Use generic clock manipulation routines for runtime PM
PM: Remove sysdev suspend, resume and shutdown operations
PM / PowerPC: Use struct syscore_ops instead of sysdevs for PM
PM / UNICORE32: Use struct syscore_ops instead of sysdevs for PM
PM / AVR32: Use struct syscore_ops instead of sysdevs for PM
...
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/nmi.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/arch/blackfin/kernel/nmi.c b/arch/blackfin/kernel/nmi.c index 0b5f72f17fd0..401eb1d8e3b4 100644 --- a/arch/blackfin/kernel/nmi.c +++ b/arch/blackfin/kernel/nmi.c | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/bitops.h> | 13 | #include <linux/bitops.h> |
14 | #include <linux/hardirq.h> | 14 | #include <linux/hardirq.h> |
15 | #include <linux/sysdev.h> | 15 | #include <linux/syscore_ops.h> |
16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
17 | #include <linux/nmi.h> | 17 | #include <linux/nmi.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
@@ -196,43 +196,31 @@ void touch_nmi_watchdog(void) | |||
196 | 196 | ||
197 | /* Suspend/resume support */ | 197 | /* Suspend/resume support */ |
198 | #ifdef CONFIG_PM | 198 | #ifdef CONFIG_PM |
199 | static int nmi_wdt_suspend(struct sys_device *dev, pm_message_t state) | 199 | static int nmi_wdt_suspend(void) |
200 | { | 200 | { |
201 | nmi_wdt_stop(); | 201 | nmi_wdt_stop(); |
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | 204 | ||
205 | static int nmi_wdt_resume(struct sys_device *dev) | 205 | static void nmi_wdt_resume(void) |
206 | { | 206 | { |
207 | if (nmi_active) | 207 | if (nmi_active) |
208 | nmi_wdt_start(); | 208 | nmi_wdt_start(); |
209 | return 0; | ||
210 | } | 209 | } |
211 | 210 | ||
212 | static struct sysdev_class nmi_sysclass = { | 211 | static struct syscore_ops nmi_syscore_ops = { |
213 | .name = DRV_NAME, | ||
214 | .resume = nmi_wdt_resume, | 212 | .resume = nmi_wdt_resume, |
215 | .suspend = nmi_wdt_suspend, | 213 | .suspend = nmi_wdt_suspend, |
216 | }; | 214 | }; |
217 | 215 | ||
218 | static struct sys_device device_nmi_wdt = { | 216 | static int __init init_nmi_wdt_syscore(void) |
219 | .id = 0, | ||
220 | .cls = &nmi_sysclass, | ||
221 | }; | ||
222 | |||
223 | static int __init init_nmi_wdt_sysfs(void) | ||
224 | { | 217 | { |
225 | int error; | 218 | if (nmi_active) |
226 | 219 | register_syscore_ops(&nmi_syscore_ops); | |
227 | if (!nmi_active) | ||
228 | return 0; | ||
229 | 220 | ||
230 | error = sysdev_class_register(&nmi_sysclass); | 221 | return 0; |
231 | if (!error) | ||
232 | error = sysdev_register(&device_nmi_wdt); | ||
233 | return error; | ||
234 | } | 222 | } |
235 | late_initcall(init_nmi_wdt_sysfs); | 223 | late_initcall(init_nmi_wdt_syscore); |
236 | 224 | ||
237 | #endif /* CONFIG_PM */ | 225 | #endif /* CONFIG_PM */ |
238 | 226 | ||