e100: timer power saving
authorStephen Hemminger <shemminger@linux-foundation.org>
Thu, 6 Sep 2007 18:51:37 +0000 (11:51 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:51:02 +0000 (16:51 -0700)
Since E100 timer is 2HZ, use rounding to make timer occur on the
correct boundary.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/e100.c

index e25f5ec2b27975d8889c54db2088713a47455baf..10907f158bac19f3dcd0450e0c1ee9984edd3237 100644 (file)
@@ -1605,7 +1605,8 @@ static void e100_watchdog(unsigned long data)
        else
                nic->flags &= ~ich_10h_workaround;
 
-       mod_timer(&nic->watchdog, jiffies + E100_WATCHDOG_PERIOD);
+       mod_timer(&nic->watchdog,
+                 round_jiffies(jiffies + E100_WATCHDOG_PERIOD));
 }
 
 static void e100_xmit_prepare(struct nic *nic, struct cb *cb,