wl1251: don't use [delayed_]work_pending()
authorTejun Heo <tj@kernel.org>
Sat, 22 Dec 2012 01:56:59 +0000 (17:56 -0800)
committerTejun Heo <tj@kernel.org>
Fri, 28 Dec 2012 21:40:15 +0000 (13:40 -0800)
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
drivers/net/wireless/ti/wl1251/ps.c

index db719f7d26928c4012a1020a050edbd3a9560980..b9e27b98bbc928ac2c7eb7dd9e48053c87ef60bf 100644 (file)
@@ -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;
This page took 0.025167 seconds and 5 git commands to generate.