diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 09:59:47 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 09:59:47 -0500 |
| commit | 5cb2faa6ede7ada9cb2bffc832c4ce60f53d6834 (patch) | |
| tree | 7b72b66081d042a41dc822575503133364857ce2 /include/linux/suspend.h | |
| parent | e0ee98513d1a2e24d2ddbdecf4216bcca29d1158 (diff) | |
| parent | 6060e8df517847bf445ebc61de7d4d9c7faae990 (diff) | |
Merge branch 'pending-misc' (early part) into devel
Diffstat (limited to 'include/linux/suspend.h')
| -rw-r--r-- | include/linux/suspend.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cd15df6c63cd..5e781d824e6d 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -301,6 +301,8 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
| 301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
| 302 | #endif /* !CONFIG_PM_SLEEP */ | 302 | #endif /* !CONFIG_PM_SLEEP */ |
| 303 | 303 | ||
| 304 | extern struct mutex pm_mutex; | ||
| 305 | |||
| 304 | #ifndef CONFIG_HIBERNATION | 306 | #ifndef CONFIG_HIBERNATION |
| 305 | static inline void register_nosave_region(unsigned long b, unsigned long e) | 307 | static inline void register_nosave_region(unsigned long b, unsigned long e) |
| 306 | { | 308 | { |
| @@ -308,8 +310,23 @@ static inline void register_nosave_region(unsigned long b, unsigned long e) | |||
| 308 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | 310 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) |
| 309 | { | 311 | { |
| 310 | } | 312 | } |
| 311 | #endif | ||
| 312 | 313 | ||
| 313 | extern struct mutex pm_mutex; | 314 | static inline void lock_system_sleep(void) {} |
| 315 | static inline void unlock_system_sleep(void) {} | ||
| 316 | |||
| 317 | #else | ||
| 318 | |||
| 319 | /* Let some subsystems like memory hotadd exclude hibernation */ | ||
| 320 | |||
| 321 | static inline void lock_system_sleep(void) | ||
| 322 | { | ||
| 323 | mutex_lock(&pm_mutex); | ||
| 324 | } | ||
| 325 | |||
| 326 | static inline void unlock_system_sleep(void) | ||
| 327 | { | ||
| 328 | mutex_unlock(&pm_mutex); | ||
| 329 | } | ||
| 330 | #endif | ||
| 314 | 331 | ||
| 315 | #endif /* _LINUX_SUSPEND_H */ | 332 | #endif /* _LINUX_SUSPEND_H */ |
