summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sun/niu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sun/niu.c')
-rw-r--r--drivers/net/ethernet/sun/niu.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index bde19b307d0d..ab502ee35fb2 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -2221,9 +2221,9 @@ static int niu_link_status(struct niu *np, int *link_up_p)
return err;
}
-static void niu_timer(unsigned long __opaque)
+static void niu_timer(struct timer_list *t)
{
- struct niu *np = (struct niu *) __opaque;
+ struct niu *np = from_timer(np, t, timer);
unsigned long off;
int err, link_up;
@@ -6123,7 +6123,7 @@ static int niu_open(struct net_device *dev)
err = niu_init_hw(np);
if (!err) {
- setup_timer(&np->timer, niu_timer, (unsigned long)np);
+ timer_setup(&np->timer, niu_timer, 0);
np->timer.expires = jiffies + HZ;
err = niu_enable_interrupts(np, 1);
@@ -6773,10 +6773,8 @@ static int niu_change_mtu(struct net_device *dev, int new_mtu)
err = niu_init_hw(np);
if (!err) {
- init_timer(&np->timer);
+ timer_setup(&np->timer, niu_timer, 0);
np->timer.expires = jiffies + HZ;
- np->timer.data = (unsigned long) np;
- np->timer.function = niu_timer;
err = niu_enable_interrupts(np, 1);
if (err)