From: Tejun Heo Date: Sat, 22 Dec 2012 01:56:59 +0000 (-0800) Subject: wl1251: don't use [delayed_]work_pending() X-Git-Tag: pm+acpi-fixes-3.9-rc1~25^2~7 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=02957f92bcc96be5c84a4000f9d22c592158602e;p=uclinux-h8%2Flinux.git wl1251: don't use [delayed_]work_pending() 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 Acked-by: Luciano Coelho Cc: linux-wireless@vger.kernel.org --- diff --git a/drivers/net/wireless/ti/wl1251/ps.c b/drivers/net/wireless/ti/wl1251/ps.c index db719f7d2692..b9e27b98bbc9 100644 --- a/drivers/net/wireless/ti/wl1251/ps.c +++ b/drivers/net/wireless/ti/wl1251/ps.c @@ -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;