summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/dec/tulip/de4x5.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-18 12:40:40 +0100
committerDavid S. Miller <davem@davemloft.net>2017-10-18 12:40:40 +0100
commit2af55f460738c78e63596e320f6dbde0cd4cfb84 (patch)
tree149c0e1ec9e7711d559c76ea0e5d82893d92b168 /drivers/net/ethernet/dec/tulip/de4x5.c
parent1bbc728988f09e40c83585cf3322b1f6c1aa17b5 (diff)
parentff861c4d64f2df1c7eaabaf2ba8f2f8ebc4b28e3 (diff)
downloadlinux-2af55f460738c78e63596e320f6dbde0cd4cfb84.tar.gz
linux-2af55f460738c78e63596e320f6dbde0cd4cfb84.tar.xz
Merge branch 'networking-Convert-timers-to-use-timer_setup'
Kees Cook says: ==================== networking: Convert timers to use timer_setup() This is the current set of outstanding networking patches to perform conversions to the new timer interface (rebased to -next). This is not all expected conversions, but it contains everything needed in networking to eliminate init_timer(), and all the non-standard setup_*_timer() uses. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dec/tulip/de4x5.c')
-rw-r--r--drivers/net/ethernet/dec/tulip/de4x5.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index 299812e92db7..a31b4df3e7ff 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -912,7 +912,7 @@ static int de4x5_init(struct net_device *dev);
static int de4x5_sw_reset(struct net_device *dev);
static int de4x5_rx(struct net_device *dev);
static int de4x5_tx(struct net_device *dev);
-static void de4x5_ast(struct net_device *dev);
+static void de4x5_ast(struct timer_list *t);
static int de4x5_txur(struct net_device *dev);
static int de4x5_rx_ovfc(struct net_device *dev);
@@ -1147,8 +1147,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
lp->timeout = -1;
lp->gendev = gendev;
spin_lock_init(&lp->lock);
- setup_timer(&lp->timer, (void (*)(unsigned long))de4x5_ast,
- (unsigned long)dev);
+ timer_setup(&lp->timer, de4x5_ast, 0);
de4x5_parse_params(dev);
/*
@@ -1741,9 +1740,10 @@ de4x5_tx(struct net_device *dev)
}
static void
-de4x5_ast(struct net_device *dev)
+de4x5_ast(struct timer_list *t)
{
- struct de4x5_private *lp = netdev_priv(dev);
+ struct de4x5_private *lp = from_timer(lp, t, timer);
+ struct net_device *dev = dev_get_drvdata(lp->gendev);
int next_tick = DE4X5_AUTOSENSE_MS;
int dt;
@@ -2369,7 +2369,7 @@ autoconf_media(struct net_device *dev)
lp->media = INIT;
lp->tcount = 0;
- de4x5_ast(dev);
+ de4x5_ast(&lp->timer);
return lp->media;
}