leds: bcm6358: Use bcm6358_led_set() in order to get rid of the lock
Replaces bcm6358_led_mode with bcm6358_led_set so we don't need to handle
the lock.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c
index 82b4ee1..a98cc71 100644
--- a/drivers/leds/leds-bcm6358.c
+++ b/drivers/leds/leds-bcm6358.c
@@ -141,9 +141,10 @@
} else {
led->cdev.brightness = LED_OFF;
}
- bcm6358_led_mode(led, led->cdev.brightness);
spin_unlock_irqrestore(lock, flags);
+ bcm6358_led_set(&led->cdev, led->cdev.brightness);
+
led->cdev.brightness_set = bcm6358_led_set;
rc = led_classdev_register(dev, &led->cdev);