aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-01 14:59:50 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-11 01:12:32 -0500
commit667445008db3f45a760c235d771be0c9671e59e5 (patch)
tree6b6fea62bfcfeb78a6deeb851b70c8eda0700c17 /drivers/net/e1000
parent19a0b67afd174c4db261d587b5c67704dcd53c17 (diff)
Intel Wired LAN drivers: Use static const
Based on work by Joe Perches <joe@perches.com> Using static const to decrease data and overall object size. CC: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000_hw.c20
-rw-r--r--drivers/net/e1000/e1000_param.c13
2 files changed, 17 insertions, 16 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index c7e242b69a18..77d08e697b74 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -4892,11 +4892,11 @@ static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length,
4892 } else if (hw->phy_type == e1000_phy_igp) { /* For IGP PHY */ 4892 } else if (hw->phy_type == e1000_phy_igp) { /* For IGP PHY */
4893 u16 cur_agc_value; 4893 u16 cur_agc_value;
4894 u16 min_agc_value = IGP01E1000_AGC_LENGTH_TABLE_SIZE; 4894 u16 min_agc_value = IGP01E1000_AGC_LENGTH_TABLE_SIZE;
4895 u16 agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = 4895 static const u16 agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = {
4896 { IGP01E1000_PHY_AGC_A, 4896 IGP01E1000_PHY_AGC_A,
4897 IGP01E1000_PHY_AGC_B, 4897 IGP01E1000_PHY_AGC_B,
4898 IGP01E1000_PHY_AGC_C, 4898 IGP01E1000_PHY_AGC_C,
4899 IGP01E1000_PHY_AGC_D 4899 IGP01E1000_PHY_AGC_D
4900 }; 4900 };
4901 /* Read the AGC registers for all channels */ 4901 /* Read the AGC registers for all channels */
4902 for (i = 0; i < IGP01E1000_PHY_CHANNEL_NUM; i++) { 4902 for (i = 0; i < IGP01E1000_PHY_CHANNEL_NUM; i++) {
@@ -5071,11 +5071,11 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
5071{ 5071{
5072 s32 ret_val; 5072 s32 ret_val;
5073 u16 phy_data, phy_saved_data, speed, duplex, i; 5073 u16 phy_data, phy_saved_data, speed, duplex, i;
5074 u16 dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = 5074 static const u16 dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = {
5075 { IGP01E1000_PHY_AGC_PARAM_A, 5075 IGP01E1000_PHY_AGC_PARAM_A,
5076 IGP01E1000_PHY_AGC_PARAM_B, 5076 IGP01E1000_PHY_AGC_PARAM_B,
5077 IGP01E1000_PHY_AGC_PARAM_C, 5077 IGP01E1000_PHY_AGC_PARAM_C,
5078 IGP01E1000_PHY_AGC_PARAM_D 5078 IGP01E1000_PHY_AGC_PARAM_D
5079 }; 5079 };
5080 u16 min_length, max_length; 5080 u16 min_length, max_length;
5081 5081
diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
index 10d8d98bb797..1301eba8b57a 100644
--- a/drivers/net/e1000/e1000_param.c
+++ b/drivers/net/e1000/e1000_param.c
@@ -352,12 +352,13 @@ void __devinit e1000_check_options(struct e1000_adapter *adapter)
352 } 352 }
353 { /* Flow Control */ 353 { /* Flow Control */
354 354
355 struct e1000_opt_list fc_list[] = 355 static const struct e1000_opt_list fc_list[] = {
356 {{ E1000_FC_NONE, "Flow Control Disabled" }, 356 { E1000_FC_NONE, "Flow Control Disabled" },
357 { E1000_FC_RX_PAUSE,"Flow Control Receive Only" }, 357 { E1000_FC_RX_PAUSE, "Flow Control Receive Only" },
358 { E1000_FC_TX_PAUSE,"Flow Control Transmit Only" }, 358 { E1000_FC_TX_PAUSE, "Flow Control Transmit Only" },
359 { E1000_FC_FULL, "Flow Control Enabled" }, 359 { E1000_FC_FULL, "Flow Control Enabled" },
360 { E1000_FC_DEFAULT, "Flow Control Hardware Default" }}; 360 { E1000_FC_DEFAULT, "Flow Control Hardware Default" }
361 };
361 362
362 opt = (struct e1000_option) { 363 opt = (struct e1000_option) {
363 .type = list_option, 364 .type = list_option,