diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2013-01-05 08:06:19 (GMT) |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-01-28 06:22:11 (GMT) |
commit | 84c1befe341d71ed1b878afa28bb637a0b459161 (patch) | |
tree | 20f0cd65729ddb6ef9e2305cba6054285f38bd2c | |
parent | fe90849f76de7cd584e8c6c38b076cd366415994 (diff) | |
download | linux-84c1befe341d71ed1b878afa28bb637a0b459161.tar.xz |
e1000e: cleanup: remove e1000_get_phy_cfg_done()
Remove the function e1000_get_phy_cfg_done() and replace the single call
to it with the same function pointer that it would call. The function
pointer is always set so there is no risk of a NULL pointer dereference.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index 37a85d4..3cf627b 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c @@ -28,7 +28,6 @@ #include "e1000.h" -static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw); static s32 e1000_wait_autoneg(struct e1000_hw *hw); static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset, u16 *data, bool read, bool page_set); @@ -2165,7 +2164,7 @@ s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw) phy->ops.release(hw); - return e1000_get_phy_cfg_done(hw); + return phy->ops.get_cfg_done(hw); } /** @@ -2265,23 +2264,6 @@ s32 e1000e_phy_init_script_igp3(struct e1000_hw *hw) return 0; } -/* Internal function pointers */ - -/** - * e1000_get_phy_cfg_done - Generic PHY configuration done - * @hw: pointer to the HW structure - * - * Return success if silicon family did not implement a family specific - * get_cfg_done function. - **/ -static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw) -{ - if (hw->phy.ops.get_cfg_done) - return hw->phy.ops.get_cfg_done(hw); - - return 0; -} - /** * e1000e_get_phy_type_from_id - Get PHY type from id * @phy_id: phy_id read from the phy |