Commit 1ab69fb3 authored by Sasha Neftin's avatar Sasha Neftin Committed by Jeff Kirsher

igc: Remove no need declaration of the igc_power_down_link

We want to avoid forward-declarations of function if possible.
Rearrange the igc_power_down_link function implementation.
Signed-off-by: default avatarSasha Neftin <sasha.neftin@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 14504ac5
......@@ -54,7 +54,6 @@ MODULE_DEVICE_TABLE(pci, igc_pci_tbl);
/* forward declaration */
static int igc_sw_init(struct igc_adapter *);
static void igc_configure(struct igc_adapter *adapter);
static void igc_power_down_link(struct igc_adapter *adapter);
static void igc_set_default_mac_filter(struct igc_adapter *adapter);
static void igc_set_rx_mode(struct net_device *netdev);
static void igc_write_itr(struct igc_q_vector *q_vector);
......@@ -76,6 +75,16 @@ enum latency_range {
latency_invalid = 255
};
/**
* igc_power_down_link - Power down the phy/serdes link
* @adapter: address of board private structure
*/
static void igc_power_down_link(struct igc_adapter *adapter)
{
if (adapter->hw.phy.media_type == igc_media_type_copper)
igc_power_down_phy_copper_base(&adapter->hw);
}
void igc_reset(struct igc_adapter *adapter)
{
struct pci_dev *pdev = adapter->pdev;
......@@ -127,16 +136,6 @@ static void igc_power_up_link(struct igc_adapter *adapter)
igc_setup_link(&adapter->hw);
}
/**
* igc_power_down_link - Power down the phy link
* @adapter: address of board private structure
*/
static void igc_power_down_link(struct igc_adapter *adapter)
{
if (adapter->hw.phy.media_type == igc_media_type_copper)
igc_power_down_phy_copper_base(&adapter->hw);
}
/**
* igc_release_hw_control - release control of the h/w to f/w
* @adapter: address of board private structure
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment