aboutsummaryrefslogtreecommitdiffstats
path: root/net/rfkill
diff options
context:
space:
mode:
Diffstat (limited to 'net/rfkill')
-rw-r--r--net/rfkill/core.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 91e9168b5447..11b7314723df 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -909,16 +909,15 @@ int __must_check rfkill_register(struct rfkill *rfkill)
909 909
910 rfkill->registered = true; 910 rfkill->registered = true;
911 911
912 if (rfkill->ops->poll) { 912 INIT_DELAYED_WORK(&rfkill->poll_work, rfkill_poll);
913 INIT_DELAYED_WORK(&rfkill->poll_work, rfkill_poll);
914 schedule_delayed_work(&rfkill->poll_work,
915 round_jiffies_relative(POLL_INTERVAL));
916 }
917
918 INIT_WORK(&rfkill->uevent_work, rfkill_uevent_work); 913 INIT_WORK(&rfkill->uevent_work, rfkill_uevent_work);
919
920 INIT_WORK(&rfkill->sync_work, rfkill_sync_work); 914 INIT_WORK(&rfkill->sync_work, rfkill_sync_work);
915
916 if (rfkill->ops->poll)
917 schedule_delayed_work(&rfkill->poll_work,
918 round_jiffies_relative(POLL_INTERVAL));
921 schedule_work(&rfkill->sync_work); 919 schedule_work(&rfkill->sync_work);
920
922 rfkill_send_events(rfkill, RFKILL_OP_ADD); 921 rfkill_send_events(rfkill, RFKILL_OP_ADD);
923 922
924 mutex_unlock(&rfkill_global_mutex); 923 mutex_unlock(&rfkill_global_mutex);