staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 18 Oct 2016 14:38:33 +0000 (14:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Oct 2016 07:59:49 +0000 (09:59 +0200)
Use setup_timer function instead of initializing timer with the function
and data fields

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c

index 7b864c02348b444cc8ddaefccd3bb9f0a37124a3..3c58f8427e0319611034b228bcdd8d32c7717397 100644 (file)
@@ -3460,9 +3460,8 @@ int ks_wlan_net_start(struct net_device *dev)
 
        /* phy information update timer */
        atomic_set(&update_phyinfo, 0);
-       init_timer(&update_phyinfo_timer);
-       update_phyinfo_timer.function = ks_wlan_update_phyinfo_timeout;
-       update_phyinfo_timer.data = (unsigned long)priv;
+       setup_timer(&update_phyinfo_timer, ks_wlan_update_phyinfo_timeout,
+                   (unsigned long)priv);
 
        /* dummy address set */
        memcpy(priv->eth_addr, dummy_addr, ETH_ALEN);