aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-02-03 03:44:45 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-04 16:58:29 -0500
commit51fd9471492adecaebae199a6b18ff929062620a (patch)
tree756cce97c7c9d17dae998fded283c4023abf23fc
parent45e826fd57bdb1c1009358608b663a22742d9f9e (diff)
tlan: use msecs_to_jiffies for conversion
This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ti/tlan.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index f2ff0074aac9..1f722c99afb9 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -2540,7 +2540,7 @@ static void tlan_phy_power_down(struct net_device *dev)
2540 * This is abitrary. It is intended to make sure the 2540 * This is abitrary. It is intended to make sure the
2541 * transceiver settles. 2541 * transceiver settles.
2542 */ 2542 */
2543 tlan_set_timer(dev, (HZ/20), TLAN_TIMER_PHY_PUP); 2543 tlan_set_timer(dev, msecs_to_jiffies(50), TLAN_TIMER_PHY_PUP);
2544 2544
2545} 2545}
2546 2546
@@ -2593,7 +2593,7 @@ static void tlan_phy_reset(struct net_device *dev)
2593 * I don't remember why I wait this long. 2593 * I don't remember why I wait this long.
2594 * I've changed this to 50ms, as it seems long enough. 2594 * I've changed this to 50ms, as it seems long enough.
2595 */ 2595 */
2596 tlan_set_timer(dev, (HZ/20), TLAN_TIMER_PHY_START_LINK); 2596 tlan_set_timer(dev, msecs_to_jiffies(50), TLAN_TIMER_PHY_START_LINK);
2597 2597
2598} 2598}
2599 2599
@@ -2658,7 +2658,7 @@ static void tlan_phy_start_link(struct net_device *dev)
2658 data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN 2658 data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN
2659 | TLAN_NET_CFG_PHY_EN; 2659 | TLAN_NET_CFG_PHY_EN;
2660 tlan_dio_write16(dev->base_addr, TLAN_NET_CONFIG, data); 2660 tlan_dio_write16(dev->base_addr, TLAN_NET_CONFIG, data);
2661 tlan_set_timer(dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN); 2661 tlan_set_timer(dev, msecs_to_jiffies(40), TLAN_TIMER_PHY_PDOWN);
2662 return; 2662 return;
2663 } else if (priv->phy_num == 0) { 2663 } else if (priv->phy_num == 0) {
2664 control = 0; 2664 control = 0;
@@ -2725,7 +2725,7 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev)
2725 (priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10) && 2725 (priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10) &&
2726 (priv->phy_num != 0)) { 2726 (priv->phy_num != 0)) {
2727 priv->phy_num = 0; 2727 priv->phy_num = 0;
2728 tlan_set_timer(dev, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN); 2728 tlan_set_timer(dev, msecs_to_jiffies(400), TLAN_TIMER_PHY_PDOWN);
2729 return; 2729 return;
2730 } 2730 }
2731 2731
@@ -2744,7 +2744,7 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev)
2744 2744
2745 /* Wait for 100 ms. No reason in partiticular. 2745 /* Wait for 100 ms. No reason in partiticular.
2746 */ 2746 */
2747 tlan_set_timer(dev, (HZ/10), TLAN_TIMER_FINISH_RESET); 2747 tlan_set_timer(dev, msecs_to_jiffies(100), TLAN_TIMER_FINISH_RESET);
2748 2748
2749} 2749}
2750 2750
@@ -2796,7 +2796,7 @@ static void tlan_phy_monitor(unsigned long data)
2796 /* set to external PHY */ 2796 /* set to external PHY */
2797 priv->phy_num = 1; 2797 priv->phy_num = 1;
2798 /* restart autonegotiation */ 2798 /* restart autonegotiation */
2799 tlan_set_timer(dev, 4 * HZ / 10, 2799 tlan_set_timer(dev, msecs_to_jiffies(400),
2800 TLAN_TIMER_PHY_PDOWN); 2800 TLAN_TIMER_PHY_PDOWN);
2801 return; 2801 return;
2802 } 2802 }