aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-10-27 19:51:35 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 06:26:02 -0400
commit330a6d6a7c75e11ca6da52092cfa96cda45d3386 (patch)
tree302bb3d8119031cf4789832226080ea2c3e2b1ba /drivers/net/igb
parent42d0781a1337ec5624da0657ba57b734768f489c (diff)
igb: replace unecessary &adapter->hw with just hw where applicable
This patch just cleans up some unecessary references to the adapter->hw member when it has already been placed in a local variable named hw. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/igb_main.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index d3e831699b47..b2c0c979628c 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1107,8 +1107,8 @@ int igb_up(struct igb_adapter *adapter)
1107 1107
1108void igb_down(struct igb_adapter *adapter) 1108void igb_down(struct igb_adapter *adapter)
1109{ 1109{
1110 struct e1000_hw *hw = &adapter->hw;
1111 struct net_device *netdev = adapter->netdev; 1110 struct net_device *netdev = adapter->netdev;
1111 struct e1000_hw *hw = &adapter->hw;
1112 u32 tctl, rctl; 1112 u32 tctl, rctl;
1113 int i; 1113 int i;
1114 1114
@@ -1271,10 +1271,10 @@ void igb_reset(struct igb_adapter *adapter)
1271 } 1271 }
1272 1272
1273 /* Allow time for pending master requests to run */ 1273 /* Allow time for pending master requests to run */
1274 adapter->hw.mac.ops.reset_hw(&adapter->hw); 1274 hw->mac.ops.reset_hw(hw);
1275 wr32(E1000_WUC, 0); 1275 wr32(E1000_WUC, 0);
1276 1276
1277 if (adapter->hw.mac.ops.init_hw(&adapter->hw)) 1277 if (hw->mac.ops.init_hw(hw))
1278 dev_err(&adapter->pdev->dev, "Hardware Error\n"); 1278 dev_err(&adapter->pdev->dev, "Hardware Error\n");
1279 1279
1280 igb_update_mng_vlan(adapter); 1280 igb_update_mng_vlan(adapter);
@@ -1282,8 +1282,8 @@ void igb_reset(struct igb_adapter *adapter)
1282 /* Enable h/w to recognize an 802.1Q VLAN Ethernet packet */ 1282 /* Enable h/w to recognize an 802.1Q VLAN Ethernet packet */
1283 wr32(E1000_VET, ETHERNET_IEEE_VLAN_TYPE); 1283 wr32(E1000_VET, ETHERNET_IEEE_VLAN_TYPE);
1284 1284
1285 igb_reset_adaptive(&adapter->hw); 1285 igb_reset_adaptive(hw);
1286 igb_get_phy_info(&adapter->hw); 1286 igb_get_phy_info(hw);
1287} 1287}
1288 1288
1289static const struct net_device_ops igb_netdev_ops = { 1289static const struct net_device_ops igb_netdev_ops = {
@@ -1404,8 +1404,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1404 hw->subsystem_vendor_id = pdev->subsystem_vendor; 1404 hw->subsystem_vendor_id = pdev->subsystem_vendor;
1405 hw->subsystem_device_id = pdev->subsystem_device; 1405 hw->subsystem_device_id = pdev->subsystem_device;
1406 1406
1407 /* setup the private structure */
1408 hw->back = adapter;
1409 /* Copy the default MAC, PHY and NVM function pointers */ 1407 /* Copy the default MAC, PHY and NVM function pointers */
1410 memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops)); 1408 memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
1411 memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops)); 1409 memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops));
@@ -1460,7 +1458,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1460 if (adapter->hw.mac.type == e1000_82576) 1458 if (adapter->hw.mac.type == e1000_82576)
1461 netdev->features |= NETIF_F_SCTP_CSUM; 1459 netdev->features |= NETIF_F_SCTP_CSUM;
1462 1460
1463 adapter->en_mng_pt = igb_enable_mng_pass_thru(&adapter->hw); 1461 adapter->en_mng_pt = igb_enable_mng_pass_thru(hw);
1464 1462
1465 /* before reading the NVM, reset the controller to put the device in a 1463 /* before reading the NVM, reset the controller to put the device in a
1466 * known good starting state */ 1464 * known good starting state */
@@ -1705,8 +1703,8 @@ static void __devexit igb_remove(struct pci_dev *pdev)
1705 1703
1706 unregister_netdev(netdev); 1704 unregister_netdev(netdev);
1707 1705
1708 if (!igb_check_reset_block(&adapter->hw)) 1706 if (!igb_check_reset_block(hw))
1709 igb_reset_phy(&adapter->hw); 1707 igb_reset_phy(hw);
1710 1708
1711 igb_clear_interrupt_scheme(adapter); 1709 igb_clear_interrupt_scheme(adapter);
1712 1710
@@ -2928,9 +2926,9 @@ static void igb_watchdog_task(struct work_struct *work)
2928 if (link) { 2926 if (link) {
2929 if (!netif_carrier_ok(netdev)) { 2927 if (!netif_carrier_ok(netdev)) {
2930 u32 ctrl; 2928 u32 ctrl;
2931 hw->mac.ops.get_speed_and_duplex(&adapter->hw, 2929 hw->mac.ops.get_speed_and_duplex(hw,
2932 &adapter->link_speed, 2930 &adapter->link_speed,
2933 &adapter->link_duplex); 2931 &adapter->link_duplex);
2934 2932
2935 ctrl = rd32(E1000_CTRL); 2933 ctrl = rd32(E1000_CTRL);
2936 /* Links status message must follow this format */ 2934 /* Links status message must follow this format */
@@ -5552,7 +5550,7 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake)
5552 wr32(E1000_CTRL, ctrl); 5550 wr32(E1000_CTRL, ctrl);
5553 5551
5554 /* Allow time for pending master requests to run */ 5552 /* Allow time for pending master requests to run */
5555 igb_disable_pcie_master(&adapter->hw); 5553 igb_disable_pcie_master(hw);
5556 5554
5557 wr32(E1000_WUC, E1000_WUC_PME_EN); 5555 wr32(E1000_WUC, E1000_WUC_PME_EN);
5558 wr32(E1000_WUFC, wufc); 5556 wr32(E1000_WUFC, wufc);