From: Grazvydas Ignotas Date: Sun, 6 Mar 2011 17:23:37 +0000 (+0200) Subject: wl1251: fix elp_work race condition X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a28577f7ba761c5c78e5da04b5bea23f34209d6;p=pandora-kernel.git wl1251: fix elp_work race condition While working on PS I've noticed elp_work is kicking rather often, and sometimes the chip is put to sleep before 5ms delay expires. This seems to happen because by the time wl1251_ps_elp_wakeup is called elp_work might still be pending. After wakeup is done, the processing may take some time, during which 5ms might expire and elp_work might get scheduled. In this case, ss soon as 1st thread finishes work and releases the mutex, elp_work will then put the device to sleep without 5ms delay. In addition 1st thread will queue additional elp_work needlessly. Fix this by cancelling work in wl1251_ps_elp_wakeup instead. Signed-off-by: Grazvydas Ignotas Acked-by: Kalle Valo Signed-off-by: John W. Linville --- Reading git-diff-tree failed