drivers/net: amd: 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: Tom Lendacky <thomas.lendacky@amd.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Allen Pais <allen.lkml@gmail.com> Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c63144e4dd
commit
c6c52ba151
@@ -302,10 +302,10 @@ am79c961_init_for_open(struct net_device *dev)
|
||||
write_rreg (dev->base_addr, CSR0, CSR0_IENA|CSR0_STRT);
|
||||
}
|
||||
|
||||
static void am79c961_timer(unsigned long data)
|
||||
static void am79c961_timer(struct timer_list *t)
|
||||
{
|
||||
struct net_device *dev = (struct net_device *)data;
|
||||
struct dev_priv *priv = netdev_priv(dev);
|
||||
struct dev_priv *priv = from_timer(priv, t, timer);
|
||||
struct net_device *dev = priv->dev;
|
||||
unsigned int lnkstat, carrier;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -728,7 +728,8 @@ static int am79c961_probe(struct platform_device *pdev)
|
||||
am79c961_banner();
|
||||
|
||||
spin_lock_init(&priv->chip_lock);
|
||||
setup_timer(&priv->timer, am79c961_timer, (unsigned long)dev);
|
||||
priv->dev = dev;
|
||||
timer_setup(&priv->timer, am79c961_timer, 0);
|
||||
|
||||
if (am79c961_hw_init(dev))
|
||||
goto release;
|
||||
|
Reference in New Issue
Block a user