mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Acked-by: Johannes Berg <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: [email protected]
This commit is contained in:
parent
02957f92bc
commit
ba0c96cd9a
1 changed files with 3 additions and 5 deletions
|
|
@ -148,11 +148,9 @@ static unsigned long rfkill_ratelimit(const unsigned long last)
|
|||
|
||||
static void rfkill_schedule_ratelimited(void)
|
||||
{
|
||||
if (delayed_work_pending(&rfkill_op_work))
|
||||
return;
|
||||
schedule_delayed_work(&rfkill_op_work,
|
||||
rfkill_ratelimit(rfkill_last_scheduled));
|
||||
rfkill_last_scheduled = jiffies;
|
||||
if (schedule_delayed_work(&rfkill_op_work,
|
||||
rfkill_ratelimit(rfkill_last_scheduled)))
|
||||
rfkill_last_scheduled = jiffies;
|
||||
}
|
||||
|
||||
static void rfkill_schedule_global_op(enum rfkill_sched_op op)
|
||||
|
|
|
|||
Loading…
Reference in a new issue