[PATCH] Fix IS_ERR Threshold Value
[linux-2.6] / include / linux / pm_legacy.h
1 #ifndef __LINUX_PM_LEGACY_H__
2 #define __LINUX_PM_LEGACY_H__
3
4
5 #ifdef CONFIG_PM_LEGACY
6
7 extern int pm_active;
8
9 #define PM_IS_ACTIVE() (pm_active != 0)
10
11 /*
12  * Register a device with power management
13  */
14 struct pm_dev __deprecated *
15 pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
16
17 /*
18  * Unregister all devices with matching callback
19  */
20 void __deprecated pm_unregister_all(pm_callback callback);
21
22 /*
23  * Send a request to all devices
24  */
25 int __deprecated pm_send_all(pm_request_t rqst, void *data);
26
27 #else /* CONFIG_PM_LEGACY */
28
29 #define PM_IS_ACTIVE() 0
30
31 static inline struct pm_dev *pm_register(pm_dev_t type,
32                                          unsigned long id,
33                                          pm_callback callback)
34 {
35         return NULL;
36 }
37
38 static inline void pm_unregister_all(pm_callback callback) {}
39
40 static inline int pm_send_all(pm_request_t rqst, void *data)
41 {
42         return 0;
43 }
44
45 #endif /* CONFIG_PM_LEGACY */
46
47 #endif /* __LINUX_PM_LEGACY_H__ */
48