From: Álvaro Fernández Rojas Date: Tue, 15 Dec 2015 20:03:48 +0000 (+0100) Subject: leds: bcm6358: remove unneded lock when checking initial LED status X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93a708dab8175c57977d5eec757dd559128f2353;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git leds: bcm6358: remove unneded lock when checking initial LED status This lock isn't really needed, since we're only reading the register and changes made to other LEDs aren't relevant. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Jacek Anaszewski --- diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c index a98cc711003d..ab09ea453120 100644 --- a/drivers/leds/leds-bcm6358.c +++ b/drivers/leds/leds-bcm6358.c @@ -99,7 +99,6 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg, void __iomem *mem, spinlock_t *lock) { struct bcm6358_led *led; - unsigned long flags; const char *state; int rc; @@ -119,7 +118,6 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg, "linux,default-trigger", NULL); - spin_lock_irqsave(lock, flags); if (!of_property_read_string(nc, "default-state", &state)) { if (!strcmp(state, "on")) { led->cdev.brightness = LED_FULL; @@ -141,7 +139,6 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg, } else { led->cdev.brightness = LED_OFF; } - spin_unlock_irqrestore(lock, flags); bcm6358_led_set(&led->cdev, led->cdev.brightness);