leds: bcm6358: remove unneded lock when checking initial LED status
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 15 Dec 2015 20:03:48 +0000 (21:03 +0100)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 4 Jan 2016 08:57:39 +0000 (09:57 +0100)
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 <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
drivers/leds/leds-bcm6358.c

index a98cc711003d82393ef782db82fa6d573645bb5a..ab09ea4531205ca4d21bfa26012dea55b22d048a 100644 (file)
@@ -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);