aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorBenjamin Li <benli@broadcom.com>2008-09-18 19:40:49 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-18 19:40:49 -0400
commitac392abce936d78f7b731d90bfbc1001ddb446ea (patch)
treea5ed2bc8da59aa34748b418365496baf442d9521 /drivers/net/bnx2.c
parentfbbf68b7f88953a9c56b7a7b4019fa5212987b34 (diff)
bnx2: Remove timer_interval field from the bnx2 structure
The timer_interval field is only assigned once, and never reassigned. We can safely replace all instances of the timer_interval with a constant value. Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 84177663291e..883e0a724107 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -5598,7 +5598,7 @@ bnx2_5706_serdes_timer(struct bnx2 *bp)
5598 } else if ((bp->link_up == 0) && (bp->autoneg & AUTONEG_SPEED)) { 5598 } else if ((bp->link_up == 0) && (bp->autoneg & AUTONEG_SPEED)) {
5599 u32 bmcr; 5599 u32 bmcr;
5600 5600
5601 bp->current_interval = bp->timer_interval; 5601 bp->current_interval = BNX2_TIMER_INTERVAL;
5602 5602
5603 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); 5603 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr);
5604 5604
@@ -5627,7 +5627,7 @@ bnx2_5706_serdes_timer(struct bnx2 *bp)
5627 bp->phy_flags &= ~BNX2_PHY_FLAG_PARALLEL_DETECT; 5627 bp->phy_flags &= ~BNX2_PHY_FLAG_PARALLEL_DETECT;
5628 } 5628 }
5629 } else 5629 } else
5630 bp->current_interval = bp->timer_interval; 5630 bp->current_interval = BNX2_TIMER_INTERVAL;
5631 5631
5632 if (check_link) { 5632 if (check_link) {
5633 u32 val; 5633 u32 val;
@@ -5672,11 +5672,11 @@ bnx2_5708_serdes_timer(struct bnx2 *bp)
5672 } else { 5672 } else {
5673 bnx2_disable_forced_2g5(bp); 5673 bnx2_disable_forced_2g5(bp);
5674 bp->serdes_an_pending = 2; 5674 bp->serdes_an_pending = 2;
5675 bp->current_interval = bp->timer_interval; 5675 bp->current_interval = BNX2_TIMER_INTERVAL;
5676 } 5676 }
5677 5677
5678 } else 5678 } else
5679 bp->current_interval = bp->timer_interval; 5679 bp->current_interval = BNX2_TIMER_INTERVAL;
5680 5680
5681 spin_unlock(&bp->phy_lock); 5681 spin_unlock(&bp->phy_lock);
5682} 5682}
@@ -7514,8 +7514,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
7514 7514
7515 bp->stats_ticks = USEC_PER_SEC & BNX2_HC_STATS_TICKS_HC_STAT_TICKS; 7515 bp->stats_ticks = USEC_PER_SEC & BNX2_HC_STATS_TICKS_HC_STAT_TICKS;
7516 7516
7517 bp->timer_interval = HZ; 7517 bp->current_interval = BNX2_TIMER_INTERVAL;
7518 bp->current_interval = HZ;
7519 7518
7520 bp->phy_addr = 1; 7519 bp->phy_addr = 1;
7521 7520
@@ -7605,7 +7604,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
7605 bp->req_flow_ctrl = FLOW_CTRL_RX | FLOW_CTRL_TX; 7604 bp->req_flow_ctrl = FLOW_CTRL_RX | FLOW_CTRL_TX;
7606 7605
7607 init_timer(&bp->timer); 7606 init_timer(&bp->timer);
7608 bp->timer.expires = RUN_AT(bp->timer_interval); 7607 bp->timer.expires = RUN_AT(BNX2_TIMER_INTERVAL);
7609 bp->timer.data = (unsigned long) bp; 7608 bp->timer.data = (unsigned long) bp;
7610 bp->timer.function = bnx2_timer; 7609 bp->timer.function = bnx2_timer;
7611 7610