summaryrefslogtreecommitdiffstats
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 4211293..ba8b04b 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -111,7 +111,7 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
write_unlock(&leds_list_lock);
#ifdef CONFIG_LEDS_TRIGGERS
- rwlock_init(&led_cdev->trigger_lock);
+ init_rwsem(&led_cdev->trigger_lock);
rc = device_create_file(led_cdev->dev, &dev_attr_trigger);
if (rc)
@@ -147,10 +147,10 @@ void led_classdev_unregister(struct led_classdev *led_cdev)
device_remove_file(led_cdev->dev, &dev_attr_brightness);
#ifdef CONFIG_LEDS_TRIGGERS
device_remove_file(led_cdev->dev, &dev_attr_trigger);
- write_lock(&led_cdev->trigger_lock);
+ down_write(&led_cdev->trigger_lock);
if (led_cdev->trigger)
led_trigger_set(led_cdev, NULL);
- write_unlock(&led_cdev->trigger_lock);
+ up_write(&led_cdev->trigger_lock);
#endif
device_unregister(led_cdev->dev);
OpenPOWER on IntegriCloud