power: supply: smb5-lib: use spinlock to protect pr_lock_in_progress
API smblib_set_prop_typec_power_role() would be called from a hrtimer
callback which is in an interrupt context, it's not correct to use
cancel_delayed_work_sync() function inside. Change to use the
non-sleep version cancel_delayed_work() and use a spinlock to protect
the pr_lock_in_progress flag.
Change-Id: I0a2e6e63179250579d8b826eaa2c7192399e17e6
Signed-off-by:
Fenglin Wu <fenglinw@codeaurora.org>
Loading
Please register or sign in to comment