diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-17 02:24:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-18 16:44:39 +0300 |
commit | d2e5af14fc8e70e76a0dfbb91d910ef74bb0eead (patch) | |
tree | 77d84f4514779c14207409f28111a486690f52d0 /drivers/staging/rtl8192u/r8192U_dm.c | |
parent | fd5b9b83d8226a2e50ba7c01818ca4ee3dd7aa6b (diff) | |
download | linux-d2e5af14fc8e70e76a0dfbb91d910ef74bb0eead.tar.xz |
staging: rtl8192u: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Derek Robson <robsonde@gmail.com>
Cc: simran singhal <singhalsimran0@gmail.com>
Cc: Riccardo Marotti <riccardo.marotti@gmail.com>
Cc: Fabrizio Perria <fabrizio.perria@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baoyou Xie <baoyou.xie@linaro.org>
Cc: Tuomo Rinne <tuomo.rinne@gmail.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_dm.c')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_dm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index e6f8d1da65d9..17e650184ee5 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -2729,8 +2729,7 @@ static void dm_init_fsync(struct net_device *dev) priv->ieee80211->fsync_seconddiff_ratethreshold = 200; priv->ieee80211->fsync_state = Default_Fsync; priv->framesyncMonitor = 1; /* current default 0xc38 monitor on */ - setup_timer(&priv->fsync_timer, dm_fsync_timer_callback, - (unsigned long)dev); + timer_setup(&priv->fsync_timer, dm_fsync_timer_callback, 0); } static void dm_deInit_fsync(struct net_device *dev) @@ -2740,10 +2739,10 @@ static void dm_deInit_fsync(struct net_device *dev) del_timer_sync(&priv->fsync_timer); } -void dm_fsync_timer_callback(unsigned long data) +void dm_fsync_timer_callback(struct timer_list *t) { - struct net_device *dev = (struct net_device *)data; - struct r8192_priv *priv = ieee80211_priv((struct net_device *)data); + struct r8192_priv *priv = from_timer(priv, t, fsync_timer); + struct net_device *dev = priv->ieee80211->dev; u32 rate_index, rate_count = 0, rate_count_diff = 0; bool bSwitchFromCountDiff = false; bool bDoubleTimeInterval = false; |