It can be a problem when a pattern is loaded via the firmware interface. LP55xx common driver has already locked the mutex in 'lp55xx_firmware_loaded()'. So it should be deleted. Cc: Pali Rohár <pali.rohar@xxxxxxxxx> Signed-off-by: Milo Kim <milo.kim@xxxxxx> --- drivers/leds/leds-lp5521.c | 4 ---- drivers/leds/leds-lp5523.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 26f89ac..4c45ed9 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -258,8 +258,6 @@ static int lp5521_update_program_memory(struct lp55xx_chip *chip, if (i % 2) goto err; - mutex_lock(&chip->lock); - for (i = 0; i < LP5521_PROGRAM_LENGTH; i++) { ret = lp55xx_write(chip, addr[idx] + i, pattern[i]); if (ret) { @@ -268,8 +266,6 @@ static int lp5521_update_program_memory(struct lp55xx_chip *chip, } } - mutex_unlock(&chip->lock); - return size; err: diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 2ce1723..7a3b369 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c @@ -351,8 +351,6 @@ static int lp5523_update_program_memory(struct lp55xx_chip *chip, if (i % 2) goto err; - mutex_lock(&chip->lock); - for (i = 0; i < LP5523_PROGRAM_LENGTH; i++) { ret = lp55xx_write(chip, LP5523_REG_PROG_MEM + i, pattern[i]); if (ret) { @@ -361,8 +359,6 @@ static int lp5523_update_program_memory(struct lp55xx_chip *chip, } } - mutex_unlock(&chip->lock); - return size; err: -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html