diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:49:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:49:58 -0400 |
commit | e80ab411e589e00550e2e6e5a6a02d59cc730357 (patch) | |
tree | 870225ff7b5b8d03e82a996963213a4bb9cce248 /drivers/leds | |
parent | 529a41e36673b518c9e091f3a8d932b6b9e3c461 (diff) | |
parent | ee959b00c335d7780136c5abda37809191fe52c3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
SCSI: convert struct class_device to struct device
DRM: remove unused dev_class
IB: rename "dev" to "srp_dev" in srp_host structure
IB: convert struct class_device to struct device
memstick: convert struct class_device to struct device
driver core: replace remaining __FUNCTION__ occurrences
sysfs: refill attribute buffer when reading from offset 0
PM: Remove destroy_suspended_device()
Firmware: add iSCSI iBFT Support
PM: Remove legacy PM (fix)
Kobject: Replace list_for_each() with list_for_each_entry().
SYSFS: Explicitly include required header file slab.h.
Driver core: make device_is_registered() work for class devices
PM: Convert wakeup flag accessors to inline functions
PM: Make wakeup flags available whenever CONFIG_PM is set
PM: Fix misuse of wakeup flag accessors in serial core
Driver core: Call device_pm_add() after bus_add_device() in device_add()
PM: Handle device registrations during suspend/resume
block: send disk "change" event for rescan_partitions()
sysdev: detect multiple driver registrations
...
Fixed trivial conflict in include/linux/memory.h due to semaphore header
file change (made irrelevant by the change to mutex).
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); | |||
139 | /** | 139 | /** |
140 | * __led_classdev_unregister - unregisters a object of led_properties class. | 140 | * __led_classdev_unregister - unregisters a object of led_properties class. |
141 | * @led_cdev: the led device to unregister | 141 | * @led_cdev: the led device to unregister |
142 | * @suspended: indicates whether system-wide suspend or resume is in progress | ||
143 | * | 142 | * |
144 | * Unregisters a previously registered via led_classdev_register object. | 143 | * Unregisters a previously registered via led_classdev_register object. |
145 | */ | 144 | */ |
146 | void __led_classdev_unregister(struct led_classdev *led_cdev, | 145 | void led_classdev_unregister(struct led_classdev *led_cdev) |
147 | bool suspended) | ||
148 | { | 146 | { |
149 | device_remove_file(led_cdev->dev, &dev_attr_brightness); | 147 | device_remove_file(led_cdev->dev, &dev_attr_brightness); |
150 | #ifdef CONFIG_LEDS_TRIGGERS | 148 | #ifdef CONFIG_LEDS_TRIGGERS |
@@ -155,16 +153,13 @@ void __led_classdev_unregister(struct led_classdev *led_cdev, | |||
155 | up_write(&led_cdev->trigger_lock); | 153 | up_write(&led_cdev->trigger_lock); |
156 | #endif | 154 | #endif |
157 | 155 | ||
158 | if (suspended) | 156 | device_unregister(led_cdev->dev); |
159 | device_pm_schedule_removal(led_cdev->dev); | ||
160 | else | ||
161 | device_unregister(led_cdev->dev); | ||
162 | 157 | ||
163 | down_write(&leds_list_lock); | 158 | down_write(&leds_list_lock); |
164 | list_del(&led_cdev->node); | 159 | list_del(&led_cdev->node); |
165 | up_write(&leds_list_lock); | 160 | up_write(&leds_list_lock); |
166 | } | 161 | } |
167 | EXPORT_SYMBOL_GPL(__led_classdev_unregister); | 162 | EXPORT_SYMBOL_GPL(led_classdev_unregister); |
168 | 163 | ||
169 | static int __init leds_init(void) | 164 | static int __init leds_init(void) |
170 | { | 165 | { |