drivers: leds: leds-qpnp: fix led blinking colors

At blinking start, flush_work seemingly doesn't empty the
workqueue properly, so an additional cancel_work_sync call
is needed.

This fixes the wrong colors of blinking leds.

Change-Id: Ib926774a7b87866ad97993fcfb98eb3d66d66641
Signed-off-by: airlessproject <vlatko.mitreski@gmail.com>
This commit is contained in:
airlessproject 2017-01-19 01:56:32 +01:00 committed by Vladimir Mitreski
parent 6b6828f6ba
commit 88aa0f6d13

View File

@ -2704,6 +2704,7 @@ static void led_blink(struct qpnp_led_data *led,
{
int rc;
cancel_work_sync(&led->work);
flush_work(&led->work);
mutex_lock(&led->lock);
if (pwm_cfg->use_blink) {