summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
diff options
context:
space:
mode:
authorAya Mahfouz2015-02-19 06:59:51 +0100
committerGreg Kroah-Hartman2015-02-26 22:12:40 +0100
commit4fde58bb43512fc283ea76e90d20198da177fb69 (patch)
treec2531981b9d9813e6ce83000bac654c16749e53f /drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
parentstaging: panel: replace init_timer by setup_timer (diff)
downloadkernel-qcow2-linux-4fde58bb43512fc283ea76e90d20198da177fb69.tar.gz
kernel-qcow2-linux-4fde58bb43512fc283ea76e90d20198da177fb69.tar.xz
kernel-qcow2-linux-4fde58bb43512fc283ea76e90d20198da177fb69.zip
staging: rtl8192u: ieee80211: replace init_timer by setup_timer
This patch replaces init_timer and the 2 step initialization of function and data by setup_timer to make the code more concise. The issue was discovered using the following coccinelle script: @@ expression ds, e1, e2; @@ -init_timer (&ds); +setup_timer (&ds, e1, e2); ... ( -ds.function = e1; ... -ds.data = e2; | -ds.data = e2; ... -ds.function = e1; ) Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index d1471877e19d..3a5407158963 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -2722,13 +2722,11 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
ieee->enable_rx_imm_BA = 1;
ieee->tx_pending.txb = NULL;
- init_timer(&ieee->associate_timer);
- ieee->associate_timer.data = (unsigned long)ieee;
- ieee->associate_timer.function = ieee80211_associate_abort_cb;
+ setup_timer(&ieee->associate_timer, ieee80211_associate_abort_cb,
+ (unsigned long)ieee);
- init_timer(&ieee->beacon_timer);
- ieee->beacon_timer.data = (unsigned long) ieee;
- ieee->beacon_timer.function = ieee80211_send_beacon_cb;
+ setup_timer(&ieee->beacon_timer, ieee80211_send_beacon_cb,
+ (unsigned long)ieee);
ieee->wq = create_workqueue(DRV_NAME);