aboutsummaryrefslogtreecommitdiffstats
path: root/net/rfkill/input.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-12-21 20:57:04 -0500
committerTejun Heo <tj@kernel.org>2012-12-28 16:40:16 -0500
commitba0c96cd9a361693b0bae409510d614dc0e26d0f (patch)
treeb25ac2bece59445bd741a1ed4569756e878b3367 /net/rfkill/input.c
parent02957f92bcc96be5c84a4000f9d22c592158602e (diff)
rfkill: 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 rfkill. Only compile tested. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org
Diffstat (limited to 'net/rfkill/input.c')
-rw-r--r--net/rfkill/input.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/rfkill/input.c b/net/rfkill/input.c
index c9d931e7ffec..b85107b5ef62 100644
--- a/net/rfkill/input.c
+++ b/net/rfkill/input.c
@@ -148,11 +148,9 @@ static unsigned long rfkill_ratelimit(const unsigned long last)
148 148
149static void rfkill_schedule_ratelimited(void) 149static void rfkill_schedule_ratelimited(void)
150{ 150{
151 if (delayed_work_pending(&rfkill_op_work)) 151 if (schedule_delayed_work(&rfkill_op_work,
152 return; 152 rfkill_ratelimit(rfkill_last_scheduled)))
153 schedule_delayed_work(&rfkill_op_work, 153 rfkill_last_scheduled = jiffies;
154 rfkill_ratelimit(rfkill_last_scheduled));
155 rfkill_last_scheduled = jiffies;
156} 154}
157 155
158static void rfkill_schedule_global_op(enum rfkill_sched_op op) 156static void rfkill_schedule_global_op(enum rfkill_sched_op op)