summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun/sungem.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-17 02:29:28 +0200
committerDavid S. Miller <davem@davemloft.net>2017-10-18 13:40:26 +0200
commit0822c5d94e10d9790e82bdfea20a10f0884bca54 (patch)
tree25608e9af64b0b506b8002f185caa560a93ae9b9 /drivers/net/ethernet/sun/sungem.c
parentnet: ethernet: apple: Convert timers to use timer_setup() (diff)
downloadlinux-0822c5d94e10d9790e82bdfea20a10f0884bca54.tar.xz
linux-0822c5d94e10d9790e82bdfea20a10f0884bca54.zip
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/sungem.c')
-rw-r--r--drivers/net/ethernet/sun/sungem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
index b75ab8f44968..a7afcee3c5ae 100644
--- a/drivers/net/ethernet/sun/sungem.c
+++ b/drivers/net/ethernet/sun/sungem.c
@@ -1496,9 +1496,9 @@ static int gem_mdio_link_not_up(struct gem *gp)
}
}
-static void gem_link_timer(unsigned long data)
+static void gem_link_timer(struct timer_list *t)
{
- struct gem *gp = (struct gem *) data;
+ struct gem *gp = from_timer(gp, t, link_timer);
struct net_device *dev = gp->dev;
int restart_aneg = 0;
@@ -2910,7 +2910,7 @@ static int gem_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
gp->msg_enable = DEFAULT_MSG;
- setup_timer(&gp->link_timer, gem_link_timer, (unsigned long)gp);
+ timer_setup(&gp->link_timer, gem_link_timer, 0);
INIT_WORK(&gp->reset_task, gem_reset_task);