diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-06-30 05:15:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-07-12 19:09:08 -0400 |
commit | 26865e9c26d2d336f385b821b531ce2b31008e20 (patch) | |
tree | 7d170186b733aedc15570cf20c44d388c593c9cd | |
parent | 7e4ef085ea4b00cfc34e854edf448c729de8a0a5 (diff) |
[PATCH] remove kernel/power/pm.c:pm_unregister_all()
Remove the deprecated and no longer used pm_unregister_all().
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | include/linux/pm_legacy.h | 7 | ||||
-rw-r--r-- | kernel/power/pm.c | 37 |
2 files changed, 0 insertions, 44 deletions
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h index 78027c533b94..514729a44688 100644 --- a/include/linux/pm_legacy.h +++ b/include/linux/pm_legacy.h | |||
@@ -15,11 +15,6 @@ struct pm_dev __deprecated * | |||
15 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | 15 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); |
16 | 16 | ||
17 | /* | 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 | 18 | * Send a request to all devices |
24 | */ | 19 | */ |
25 | int __deprecated pm_send_all(pm_request_t rqst, void *data); | 20 | int __deprecated pm_send_all(pm_request_t rqst, void *data); |
@@ -35,8 +30,6 @@ static inline struct pm_dev *pm_register(pm_dev_t type, | |||
35 | return NULL; | 30 | return NULL; |
36 | } | 31 | } |
37 | 32 | ||
38 | static inline void pm_unregister_all(pm_callback callback) {} | ||
39 | |||
40 | static inline int pm_send_all(pm_request_t rqst, void *data) | 33 | static inline int pm_send_all(pm_request_t rqst, void *data) |
41 | { | 34 | { |
42 | return 0; | 35 | return 0; |
diff --git a/kernel/power/pm.c b/kernel/power/pm.c index 84063ac8fcfc..c50d15266c10 100644 --- a/kernel/power/pm.c +++ b/kernel/power/pm.c | |||
@@ -75,42 +75,6 @@ struct pm_dev *pm_register(pm_dev_t type, | |||
75 | return dev; | 75 | return dev; |
76 | } | 76 | } |
77 | 77 | ||
78 | static void __pm_unregister(struct pm_dev *dev) | ||
79 | { | ||
80 | if (dev) { | ||
81 | list_del(&dev->entry); | ||
82 | kfree(dev); | ||
83 | } | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * pm_unregister_all - unregister all devices with matching callback | ||
88 | * @callback: callback function pointer | ||
89 | * | ||
90 | * Unregister every device that would call the callback passed. This | ||
91 | * is primarily meant as a helper function for loadable modules. It | ||
92 | * enables a module to give up all its managed devices without keeping | ||
93 | * its own private list. | ||
94 | */ | ||
95 | |||
96 | void pm_unregister_all(pm_callback callback) | ||
97 | { | ||
98 | struct list_head *entry; | ||
99 | |||
100 | if (!callback) | ||
101 | return; | ||
102 | |||
103 | mutex_lock(&pm_devs_lock); | ||
104 | entry = pm_devs.next; | ||
105 | while (entry != &pm_devs) { | ||
106 | struct pm_dev *dev = list_entry(entry, struct pm_dev, entry); | ||
107 | entry = entry->next; | ||
108 | if (dev->callback == callback) | ||
109 | __pm_unregister(dev); | ||
110 | } | ||
111 | mutex_unlock(&pm_devs_lock); | ||
112 | } | ||
113 | |||
114 | /** | 78 | /** |
115 | * pm_send - send request to a single device | 79 | * pm_send - send request to a single device |
116 | * @dev: device to send to | 80 | * @dev: device to send to |
@@ -239,7 +203,6 @@ int pm_send_all(pm_request_t rqst, void *data) | |||
239 | } | 203 | } |
240 | 204 | ||
241 | EXPORT_SYMBOL(pm_register); | 205 | EXPORT_SYMBOL(pm_register); |
242 | EXPORT_SYMBOL(pm_unregister_all); | ||
243 | EXPORT_SYMBOL(pm_send_all); | 206 | EXPORT_SYMBOL(pm_send_all); |
244 | EXPORT_SYMBOL(pm_active); | 207 | EXPORT_SYMBOL(pm_active); |
245 | 208 | ||