瀏覽代碼

RFKILL: fix input layer initialisation

Initialise correctly last fields, so tasks can be actually executed.
On some architectures the initial jiffies value is not zero, so later
all rfkill incorrectly decides that rfkill_*.last is in future.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dmitry Baryshkov 16 年之前
父節點
當前提交
d8b105f900
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      net/rfkill/rfkill-input.c

+ 5 - 0
net/rfkill/rfkill-input.c

@@ -256,6 +256,11 @@ static struct input_handler rfkill_handler = {
 
 static int __init rfkill_handler_init(void)
 {
+	unsigned long last_run = jiffies - msecs_to_jiffies(500);
+	rfkill_wlan.last = last_run;
+	rfkill_bt.last = last_run;
+	rfkill_uwb.last = last_run;
+	rfkill_wimax.last = last_run;
 	return input_register_handler(&rfkill_handler);
 }