]> err.no Git - linux-2.6/commitdiff
[PATCH] remove kernel/power/pm.c:pm_unregister_all()
authorAdrian Bunk <bunk@stusta.de>
Fri, 30 Jun 2006 09:15:43 +0000 (02:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 Jul 2006 23:09:08 +0000 (16:09 -0700)
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>
include/linux/pm_legacy.h
kernel/power/pm.c

index 78027c533b94678fce8b685da41dc11fda656234..514729a446888e21dee4289db2ea4e71f80f6eaa 100644 (file)
@@ -14,11 +14,6 @@ extern int pm_active;
 struct pm_dev __deprecated *
 pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
 
-/*
- * Unregister all devices with matching callback
- */
-void __deprecated pm_unregister_all(pm_callback callback);
-
 /*
  * Send a request to all devices
  */
@@ -35,8 +30,6 @@ static inline struct pm_dev *pm_register(pm_dev_t type,
        return NULL;
 }
 
-static inline void pm_unregister_all(pm_callback callback) {}
-
 static inline int pm_send_all(pm_request_t rqst, void *data)
 {
        return 0;
index 84063ac8fcfc95bd15d56dc6778ec45bb503aa43..c50d15266c1096d42d61e296ea4da13d34cb57ec 100644 (file)
@@ -75,42 +75,6 @@ struct pm_dev *pm_register(pm_dev_t type,
        return dev;
 }
 
-static void __pm_unregister(struct pm_dev *dev)
-{
-       if (dev) {
-               list_del(&dev->entry);
-               kfree(dev);
-       }
-}
-
-/**
- *     pm_unregister_all - unregister all devices with matching callback
- *     @callback: callback function pointer
- *
- *     Unregister every device that would call the callback passed. This
- *     is primarily meant as a helper function for loadable modules. It
- *     enables a module to give up all its managed devices without keeping
- *     its own private list.
- */
-void pm_unregister_all(pm_callback callback)
-{
-       struct list_head *entry;
-
-       if (!callback)
-               return;
-
-       mutex_lock(&pm_devs_lock);
-       entry = pm_devs.next;
-       while (entry != &pm_devs) {
-               struct pm_dev *dev = list_entry(entry, struct pm_dev, entry);
-               entry = entry->next;
-               if (dev->callback == callback)
-                       __pm_unregister(dev);
-       }
-       mutex_unlock(&pm_devs_lock);
-}
-
 /**
  *     pm_send - send request to a single device
  *     @dev: device to send to
@@ -239,7 +203,6 @@ int pm_send_all(pm_request_t rqst, void *data)
 }
 
 EXPORT_SYMBOL(pm_register);
-EXPORT_SYMBOL(pm_unregister_all);
 EXPORT_SYMBOL(pm_send_all);
 EXPORT_SYMBOL(pm_active);