From 0822c5d94e10d9790e82bdfea20a10f0884bca54 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 16 Oct 2017 17:29:28 -0700 Subject: net: ethernet: sun: 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: "David S. Miller" Cc: Philippe Reynes Cc: Jarod Wilson Cc: Shannon Nelson Cc: Rob Herring Cc: chris hyser Cc: Tushar Dave Cc: Tobias Klauser Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Shannon Nelson Signed-off-by: David S. Miller --- drivers/net/ethernet/sun/cassini.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/net/ethernet/sun/cassini.c') diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index a74d78f64af9..113bd57e2ea0 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c @@ -4079,9 +4079,9 @@ done: #endif } -static void cas_link_timer(unsigned long data) +static void cas_link_timer(struct timer_list *t) { - struct cas *cp = (struct cas *) data; + struct cas *cp = from_timer(cp, t, link_timer); int mask, pending = 0, reset = 0; unsigned long flags; @@ -5039,7 +5039,8 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) spin_lock_init(&cp->stat_lock[N_TX_RINGS]); mutex_init(&cp->pm_mutex); - setup_timer(&cp->link_timer, cas_link_timer, (unsigned long)cp); + timer_setup(&cp->link_timer, cas_link_timer, 0); + #if 1 /* Just in case the implementation of atomic operations * change so that an explicit initialization is necessary. -- cgit v1.2.3-59-g8ed1b