summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2015-12-15 23:03:47 +0300
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-01-04 11:57:39 +0300
commit42273caa18600faede09be223310aabb8e54182e (patch)
tree45582988b3cacfa1eaac865b64ce3e2d82f8572f /drivers/leds
parent0171dc6abbfab4a168f65498a73d18311cb606b5 (diff)
downloadlinux-42273caa18600faede09be223310aabb8e54182e.tar.xz
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>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-bcm6358.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c
index 82b4ee1bc87e..a98cc711003d 100644
--- a/drivers/leds/leds-bcm6358.c
+++ b/drivers/leds/leds-bcm6358.c
@@ -141,9 +141,10 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg,
} 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);