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>
This commit is contained in:
Álvaro Fernández Rojas 2015-12-15 21:03:47 +01:00 committed by Jacek Anaszewski
parent 0171dc6abb
commit 42273caa18

View File

@ -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);