aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-bcm6358.c
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2015-12-15 20:03:47 (GMT)
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-01-04 08:57:39 (GMT)
commit42273caa18600faede09be223310aabb8e54182e (patch)
tree45582988b3cacfa1eaac865b64ce3e2d82f8572f /drivers/leds/leds-bcm6358.c
parent0171dc6abbfab4a168f65498a73d18311cb606b5 (diff)
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/leds-bcm6358.c')
-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 82b4ee1..a98cc71 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);

Privacy Policy