mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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 <noltari@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
This commit is contained in:
parent
42273caa18
commit
93a708dab8
1 changed files with 0 additions and 3 deletions
|
@ -99,7 +99,6 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg,
|
||||||
void __iomem *mem, spinlock_t *lock)
|
void __iomem *mem, spinlock_t *lock)
|
||||||
{
|
{
|
||||||
struct bcm6358_led *led;
|
struct bcm6358_led *led;
|
||||||
unsigned long flags;
|
|
||||||
const char *state;
|
const char *state;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -119,7 +118,6 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg,
|
||||||
"linux,default-trigger",
|
"linux,default-trigger",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
spin_lock_irqsave(lock, flags);
|
|
||||||
if (!of_property_read_string(nc, "default-state", &state)) {
|
if (!of_property_read_string(nc, "default-state", &state)) {
|
||||||
if (!strcmp(state, "on")) {
|
if (!strcmp(state, "on")) {
|
||||||
led->cdev.brightness = LED_FULL;
|
led->cdev.brightness = LED_FULL;
|
||||||
|
@ -141,7 +139,6 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg,
|
||||||
} else {
|
} else {
|
||||||
led->cdev.brightness = LED_OFF;
|
led->cdev.brightness = LED_OFF;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(lock, flags);
|
|
||||||
|
|
||||||
bcm6358_led_set(&led->cdev, led->cdev.brightness);
|
bcm6358_led_set(&led->cdev, led->cdev.brightness);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue