diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2008-03-23 20:28:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 19:10:28 -0700 |
commit | b844eba292b477cda14582bfc6f535deed57a82d (patch) | |
tree | b2418a9a4fc672654f4592ae0a3e2853d82271c3 /drivers/leds | |
parent | 138fe4e069798d9aa948a5402ff15e58f483ee4e (diff) | |
download | linux-b844eba292b477cda14582bfc6f535deed57a82d.tar.bz2 |
PM: Remove destroy_suspended_device()
After 2.6.24 there was a plan to make the PM core acquire all device
semaphores during a suspend/hibernation to protect itself from
concurrent operations involving device objects. That proved to be
too heavy-handed and we found a better way to achieve the goal, but
before it happened, we had introduced the functions
device_pm_schedule_removal() and destroy_suspended_device() to allow
drivers to "safely" destroy a suspended device and we had adapted some
drivers to use them. Now that these functions are no longer necessary,
it seems reasonable to remove them and modify their users to use the
normal device unregistration instead.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/led-class.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index 4a938780dfc3..63aad90247c4 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c @@ -139,12 +139,10 @@ EXPORT_SYMBOL_GPL(led_classdev_register); /** * __led_classdev_unregister - unregisters a object of led_properties class. * @led_cdev: the led device to unregister - * @suspended: indicates whether system-wide suspend or resume is in progress * * Unregisters a previously registered via led_classdev_register object. */ -void __led_classdev_unregister(struct led_classdev *led_cdev, - bool suspended) +void led_classdev_unregister(struct led_classdev *led_cdev) { device_remove_file(led_cdev->dev, &dev_attr_brightness); #ifdef CONFIG_LEDS_TRIGGERS @@ -155,16 +153,13 @@ void __led_classdev_unregister(struct led_classdev *led_cdev, up_write(&led_cdev->trigger_lock); #endif - if (suspended) - device_pm_schedule_removal(led_cdev->dev); - else - device_unregister(led_cdev->dev); + device_unregister(led_cdev->dev); down_write(&leds_list_lock); list_del(&led_cdev->node); up_write(&leds_list_lock); } -EXPORT_SYMBOL_GPL(__led_classdev_unregister); +EXPORT_SYMBOL_GPL(led_classdev_unregister); static int __init leds_init(void) { |