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:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment