Android 4.4w Release 5
[FACTORY ROM] power: bcmpmu-fg: Avoid deadlock in work queues

When low voltage IRQ triggered a work was scheduled from the IRQ
handler to make a callback to the fuel gauge.
This callback tried to cancel and reschedule a periodic work.
When cancelling the work it was waiting for it to finish. It never
finished since the periodic work in some sub function tried to
read from ADC that was pending on IRQ to proceed. This IRQ callback
was put on the same work queue as the low voltage and now there
was a deadlock.

Solved it by releasing the IRQ callback by scheduling a new work
to do the task.

Change-Id: Ifa2911f3c5fc45e15a687d1d3f4e4a38d3ace388
1 file changed