Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 658891b3 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

qpnp-fg-gen3: fix a possible wake source count leak



Currently, in the power supply notifier callback, GEN3 FG driver
calls pm_stay_awake() which increases the wake source count on
its device before it schedules status_change_work. In case, if
status_change_work is already pending, then pm_stay_awake() will
not have a balanced pm_relax() call as the work will not get
scheduled again if it's pending already. Fix this by scheduling
status_change_work and hence call pm_stay_awake() only if it is
not pending.

Change-Id: I2b8e28f6bfe1a5813410c7b1276d4e229eb67e84
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent eba048d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment