aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/led-class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/led-class.c')
-rw-r--r--drivers/leds/led-class.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index ba8b04b03b9f..64c66b3769c9 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -106,9 +106,9 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
106 goto err_out; 106 goto err_out;
107 107
108 /* add to the list of leds */ 108 /* add to the list of leds */
109 write_lock(&leds_list_lock); 109 down_write(&leds_list_lock);
110 list_add_tail(&led_cdev->node, &leds_list); 110 list_add_tail(&led_cdev->node, &leds_list);
111 write_unlock(&leds_list_lock); 111 up_write(&leds_list_lock);
112 112
113#ifdef CONFIG_LEDS_TRIGGERS 113#ifdef CONFIG_LEDS_TRIGGERS
114 init_rwsem(&led_cdev->trigger_lock); 114 init_rwsem(&led_cdev->trigger_lock);
@@ -155,9 +155,9 @@ void led_classdev_unregister(struct led_classdev *led_cdev)
155 155
156 device_unregister(led_cdev->dev); 156 device_unregister(led_cdev->dev);
157 157
158 write_lock(&leds_list_lock); 158 down_write(&leds_list_lock);
159 list_del(&led_cdev->node); 159 list_del(&led_cdev->node);
160 write_unlock(&leds_list_lock); 160 up_write(&leds_list_lock);
161} 161}
162EXPORT_SYMBOL_GPL(led_classdev_unregister); 162EXPORT_SYMBOL_GPL(led_classdev_unregister);
163 163