Skip to content
Commit dbacf752 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Jonathan Cameron
Browse files

iio:light:tsl2563: Replace cancel_delayed_work() with cancel_delayed_work_sync().



Since cancel_delayed_work(&chip->poweroff_work) does not guarantee that
tsl2563_poweroff_work() is not running, tsl2563_set_power(chip, 0) can be
called from tsl2563_poweroff_work() after tsl2563_get_power(chip) and
tsl2563_set_power(chip, 1) are called. Use _sync version in order to make
sure that tsl2563_poweroff_work() is no longer running.

Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Link: https://lore.kernel.org/r/041b6745-f784-ff3f-9836-3f4397d35d94@I-love.SAKURA.ne.jp


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 76faa320
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment