diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-16 20:29:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-18 07:40:26 -0400 |
commit | 0822c5d94e10d9790e82bdfea20a10f0884bca54 (patch) | |
tree | 25608e9af64b0b506b8002f185caa560a93ae9b9 /drivers/net/ethernet/sun/cassini.c | |
parent | de892f8f2cc8176368a490e0778fd2de15e9bfda (diff) |
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" <davem@davemloft.net>
Cc: Philippe Reynes <tremyfr@gmail.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Shannon Nelson <shannon.nelson@oracle.com>
Cc: Rob Herring <robh@kernel.org>
Cc: chris hyser <chris.hyser@oracle.com>
Cc: Tushar Dave <tushar.n.dave@oracle.com>
Cc: Tobias Klauser <tklauser@distanz.ch>
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/cassini.c')
-rw-r--r-- | drivers/net/ethernet/sun/cassini.c | 7 |
1 files changed, 4 insertions, 3 deletions
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: | |||
4079 | #endif | 4079 | #endif |
4080 | } | 4080 | } |
4081 | 4081 | ||
4082 | static void cas_link_timer(unsigned long data) | 4082 | static void cas_link_timer(struct timer_list *t) |
4083 | { | 4083 | { |
4084 | struct cas *cp = (struct cas *) data; | 4084 | struct cas *cp = from_timer(cp, t, link_timer); |
4085 | int mask, pending = 0, reset = 0; | 4085 | int mask, pending = 0, reset = 0; |
4086 | unsigned long flags; | 4086 | unsigned long flags; |
4087 | 4087 | ||
@@ -5039,7 +5039,8 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5039 | spin_lock_init(&cp->stat_lock[N_TX_RINGS]); | 5039 | spin_lock_init(&cp->stat_lock[N_TX_RINGS]); |
5040 | mutex_init(&cp->pm_mutex); | 5040 | mutex_init(&cp->pm_mutex); |
5041 | 5041 | ||
5042 | setup_timer(&cp->link_timer, cas_link_timer, (unsigned long)cp); | 5042 | timer_setup(&cp->link_timer, cas_link_timer, 0); |
5043 | |||
5043 | #if 1 | 5044 | #if 1 |
5044 | /* Just in case the implementation of atomic operations | 5045 | /* Just in case the implementation of atomic operations |
5045 | * change so that an explicit initialization is necessary. | 5046 | * change so that an explicit initialization is necessary. |