Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1503044

[PATCH -next] staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields

From Wei Yongjun <weiyj.lk@gmail.com>
Newsgroups linux.kernel
Subject [PATCH -next] staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields
Date 2016-10-18 16:40 +0200
Message-ID <stDIC-2X6-25@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Wei Yongjun <weiyongjun1@huawei.com>

Use setup_timer function instead of initializing timer with the function
and data fields

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/staging/ks7010/ks_wlan_net.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 7b864c0..3c58f84 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -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);

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH -next] staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields Wei Yongjun <weiyj.lk@gmail.com> - 2016-10-18 16:40 +0200

csiph-web