Skip to content

Commit

Permalink
wl1251: don't use [delayed_]work_pending()
Browse files Browse the repository at this point in the history
There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it.  Most uses are unnecessary
and quite a few of them are buggy.

Remove unnecessary pending tests from wl1251.  Only compile tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Luciano Coelho <coelho@ti.com>
Cc: linux-wireless@vger.kernel.org
  • Loading branch information
Tejun Heo committed Dec 28, 2012
1 parent 6d394e1 commit 02957f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/ti/wl1251/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl)
unsigned long timeout, start;
u32 elp_reg;

if (delayed_work_pending(&wl->elp_work))
cancel_delayed_work(&wl->elp_work);
cancel_delayed_work(&wl->elp_work);

if (!wl->elp)
return 0;
Expand Down

0 comments on commit 02957f9

Please sign in to comment.