diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-17 03:29:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-18 14:40:26 +0300 |
commit | d28bb967aa928d5cfd50a9a182f3b4218088c79d (patch) | |
tree | 5b4a23748b31af536081aa3fdc4e74395fb47379 /drivers/net/usb/catc.c | |
parent | dfc57004945b34cf83f600c697a54afca1fd15c5 (diff) | |
download | linux-d28bb967aa928d5cfd50a9a182f3b4218088c79d.tar.xz |
net: usb: 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: Woojung Huh <woojung.huh@microchip.com>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Philippe Reynes <tremyfr@gmail.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: "Bjørn Mork" <bjorn@mork.no>
Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Greg Ungerer <gerg@linux-m68k.org>
Cc: linux-usb@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/catc.c')
-rw-r--r-- | drivers/net/usb/catc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index aeb62e17d19d..18d36dff97ea 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c @@ -611,9 +611,9 @@ static void catc_stats_done(struct catc *catc, struct ctrl_queue *q) catc->stats_vals[index >> 1] = data; } -static void catc_stats_timer(unsigned long data) +static void catc_stats_timer(struct timer_list *t) { - struct catc *catc = (void *) data; + struct catc *catc = from_timer(catc, t, timer); int i; for (i = 0; i < 8; i++) @@ -805,7 +805,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id spin_lock_init(&catc->tx_lock); spin_lock_init(&catc->ctrl_lock); - setup_timer(&catc->timer, catc_stats_timer, (long)catc); + timer_setup(&catc->timer, catc_stats_timer, 0); catc->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL); catc->tx_urb = usb_alloc_urb(0, GFP_KERNEL); |