diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-09-24 09:23:52 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-10-05 05:52:21 -0400 |
commit | 8ce9d6c725b01989d2b18ee1df853837388ceaf6 (patch) | |
tree | 54b38c8b3824b1babc2cb2c824a3455822660ec5 | |
parent | 70f14381299984f05764c3188f1706288285c953 (diff) |
e1000e: make function tables const
The initial function and setup tables can be marked as constant.
Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/80003es2lan.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/82571.c | 20 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/e1000.h | 28 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 16 |
4 files changed, 36 insertions, 36 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c index b7544336cef4..e1159e54334a 100644 --- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c +++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c | |||
@@ -1441,7 +1441,7 @@ static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw) | |||
1441 | er32(ICRXDMTC); | 1441 | er32(ICRXDMTC); |
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | static struct e1000_mac_operations es2_mac_ops = { | 1444 | static const struct e1000_mac_operations es2_mac_ops = { |
1445 | .read_mac_addr = e1000_read_mac_addr_80003es2lan, | 1445 | .read_mac_addr = e1000_read_mac_addr_80003es2lan, |
1446 | .id_led_init = e1000e_id_led_init, | 1446 | .id_led_init = e1000e_id_led_init, |
1447 | .blink_led = e1000e_blink_led_generic, | 1447 | .blink_led = e1000e_blink_led_generic, |
@@ -1464,7 +1464,7 @@ static struct e1000_mac_operations es2_mac_ops = { | |||
1464 | .setup_led = e1000e_setup_led_generic, | 1464 | .setup_led = e1000e_setup_led_generic, |
1465 | }; | 1465 | }; |
1466 | 1466 | ||
1467 | static struct e1000_phy_operations es2_phy_ops = { | 1467 | static const struct e1000_phy_operations es2_phy_ops = { |
1468 | .acquire = e1000_acquire_phy_80003es2lan, | 1468 | .acquire = e1000_acquire_phy_80003es2lan, |
1469 | .check_polarity = e1000_check_polarity_m88, | 1469 | .check_polarity = e1000_check_polarity_m88, |
1470 | .check_reset_block = e1000e_check_reset_block_generic, | 1470 | .check_reset_block = e1000e_check_reset_block_generic, |
@@ -1482,7 +1482,7 @@ static struct e1000_phy_operations es2_phy_ops = { | |||
1482 | .cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan, | 1482 | .cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan, |
1483 | }; | 1483 | }; |
1484 | 1484 | ||
1485 | static struct e1000_nvm_operations es2_nvm_ops = { | 1485 | static const struct e1000_nvm_operations es2_nvm_ops = { |
1486 | .acquire = e1000_acquire_nvm_80003es2lan, | 1486 | .acquire = e1000_acquire_nvm_80003es2lan, |
1487 | .read = e1000e_read_nvm_eerd, | 1487 | .read = e1000e_read_nvm_eerd, |
1488 | .release = e1000_release_nvm_80003es2lan, | 1488 | .release = e1000_release_nvm_80003es2lan, |
@@ -1492,7 +1492,7 @@ static struct e1000_nvm_operations es2_nvm_ops = { | |||
1492 | .write = e1000_write_nvm_80003es2lan, | 1492 | .write = e1000_write_nvm_80003es2lan, |
1493 | }; | 1493 | }; |
1494 | 1494 | ||
1495 | struct e1000_info e1000_es2_info = { | 1495 | const struct e1000_info e1000_es2_info = { |
1496 | .mac = e1000_80003es2lan, | 1496 | .mac = e1000_80003es2lan, |
1497 | .flags = FLAG_HAS_HW_VLAN_FILTER | 1497 | .flags = FLAG_HAS_HW_VLAN_FILTER |
1498 | | FLAG_HAS_JUMBO_FRAMES | 1498 | | FLAG_HAS_JUMBO_FRAMES |
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index 2d4dc53a4fb8..a3e65fd26e09 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c | |||
@@ -1927,7 +1927,7 @@ static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw) | |||
1927 | er32(ICRXDMTC); | 1927 | er32(ICRXDMTC); |
1928 | } | 1928 | } |
1929 | 1929 | ||
1930 | static struct e1000_mac_operations e82571_mac_ops = { | 1930 | static const struct e1000_mac_operations e82571_mac_ops = { |
1931 | /* .check_mng_mode: mac type dependent */ | 1931 | /* .check_mng_mode: mac type dependent */ |
1932 | /* .check_for_link: media type dependent */ | 1932 | /* .check_for_link: media type dependent */ |
1933 | .id_led_init = e1000e_id_led_init, | 1933 | .id_led_init = e1000e_id_led_init, |
@@ -1949,7 +1949,7 @@ static struct e1000_mac_operations e82571_mac_ops = { | |||
1949 | .read_mac_addr = e1000_read_mac_addr_82571, | 1949 | .read_mac_addr = e1000_read_mac_addr_82571, |
1950 | }; | 1950 | }; |
1951 | 1951 | ||
1952 | static struct e1000_phy_operations e82_phy_ops_igp = { | 1952 | static const struct e1000_phy_operations e82_phy_ops_igp = { |
1953 | .acquire = e1000_get_hw_semaphore_82571, | 1953 | .acquire = e1000_get_hw_semaphore_82571, |
1954 | .check_polarity = e1000_check_polarity_igp, | 1954 | .check_polarity = e1000_check_polarity_igp, |
1955 | .check_reset_block = e1000e_check_reset_block_generic, | 1955 | .check_reset_block = e1000e_check_reset_block_generic, |
@@ -1967,7 +1967,7 @@ static struct e1000_phy_operations e82_phy_ops_igp = { | |||
1967 | .cfg_on_link_up = NULL, | 1967 | .cfg_on_link_up = NULL, |
1968 | }; | 1968 | }; |
1969 | 1969 | ||
1970 | static struct e1000_phy_operations e82_phy_ops_m88 = { | 1970 | static const struct e1000_phy_operations e82_phy_ops_m88 = { |
1971 | .acquire = e1000_get_hw_semaphore_82571, | 1971 | .acquire = e1000_get_hw_semaphore_82571, |
1972 | .check_polarity = e1000_check_polarity_m88, | 1972 | .check_polarity = e1000_check_polarity_m88, |
1973 | .check_reset_block = e1000e_check_reset_block_generic, | 1973 | .check_reset_block = e1000e_check_reset_block_generic, |
@@ -1985,7 +1985,7 @@ static struct e1000_phy_operations e82_phy_ops_m88 = { | |||
1985 | .cfg_on_link_up = NULL, | 1985 | .cfg_on_link_up = NULL, |
1986 | }; | 1986 | }; |
1987 | 1987 | ||
1988 | static struct e1000_phy_operations e82_phy_ops_bm = { | 1988 | static const struct e1000_phy_operations e82_phy_ops_bm = { |
1989 | .acquire = e1000_get_hw_semaphore_82571, | 1989 | .acquire = e1000_get_hw_semaphore_82571, |
1990 | .check_polarity = e1000_check_polarity_m88, | 1990 | .check_polarity = e1000_check_polarity_m88, |
1991 | .check_reset_block = e1000e_check_reset_block_generic, | 1991 | .check_reset_block = e1000e_check_reset_block_generic, |
@@ -2003,7 +2003,7 @@ static struct e1000_phy_operations e82_phy_ops_bm = { | |||
2003 | .cfg_on_link_up = NULL, | 2003 | .cfg_on_link_up = NULL, |
2004 | }; | 2004 | }; |
2005 | 2005 | ||
2006 | static struct e1000_nvm_operations e82571_nvm_ops = { | 2006 | static const struct e1000_nvm_operations e82571_nvm_ops = { |
2007 | .acquire = e1000_acquire_nvm_82571, | 2007 | .acquire = e1000_acquire_nvm_82571, |
2008 | .read = e1000e_read_nvm_eerd, | 2008 | .read = e1000e_read_nvm_eerd, |
2009 | .release = e1000_release_nvm_82571, | 2009 | .release = e1000_release_nvm_82571, |
@@ -2013,7 +2013,7 @@ static struct e1000_nvm_operations e82571_nvm_ops = { | |||
2013 | .write = e1000_write_nvm_82571, | 2013 | .write = e1000_write_nvm_82571, |
2014 | }; | 2014 | }; |
2015 | 2015 | ||
2016 | struct e1000_info e1000_82571_info = { | 2016 | const struct e1000_info e1000_82571_info = { |
2017 | .mac = e1000_82571, | 2017 | .mac = e1000_82571, |
2018 | .flags = FLAG_HAS_HW_VLAN_FILTER | 2018 | .flags = FLAG_HAS_HW_VLAN_FILTER |
2019 | | FLAG_HAS_JUMBO_FRAMES | 2019 | | FLAG_HAS_JUMBO_FRAMES |
@@ -2034,7 +2034,7 @@ struct e1000_info e1000_82571_info = { | |||
2034 | .nvm_ops = &e82571_nvm_ops, | 2034 | .nvm_ops = &e82571_nvm_ops, |
2035 | }; | 2035 | }; |
2036 | 2036 | ||
2037 | struct e1000_info e1000_82572_info = { | 2037 | const struct e1000_info e1000_82572_info = { |
2038 | .mac = e1000_82572, | 2038 | .mac = e1000_82572, |
2039 | .flags = FLAG_HAS_HW_VLAN_FILTER | 2039 | .flags = FLAG_HAS_HW_VLAN_FILTER |
2040 | | FLAG_HAS_JUMBO_FRAMES | 2040 | | FLAG_HAS_JUMBO_FRAMES |
@@ -2052,7 +2052,7 @@ struct e1000_info e1000_82572_info = { | |||
2052 | .nvm_ops = &e82571_nvm_ops, | 2052 | .nvm_ops = &e82571_nvm_ops, |
2053 | }; | 2053 | }; |
2054 | 2054 | ||
2055 | struct e1000_info e1000_82573_info = { | 2055 | const struct e1000_info e1000_82573_info = { |
2056 | .mac = e1000_82573, | 2056 | .mac = e1000_82573, |
2057 | .flags = FLAG_HAS_HW_VLAN_FILTER | 2057 | .flags = FLAG_HAS_HW_VLAN_FILTER |
2058 | | FLAG_HAS_WOL | 2058 | | FLAG_HAS_WOL |
@@ -2070,7 +2070,7 @@ struct e1000_info e1000_82573_info = { | |||
2070 | .nvm_ops = &e82571_nvm_ops, | 2070 | .nvm_ops = &e82571_nvm_ops, |
2071 | }; | 2071 | }; |
2072 | 2072 | ||
2073 | struct e1000_info e1000_82574_info = { | 2073 | const struct e1000_info e1000_82574_info = { |
2074 | .mac = e1000_82574, | 2074 | .mac = e1000_82574, |
2075 | .flags = FLAG_HAS_HW_VLAN_FILTER | 2075 | .flags = FLAG_HAS_HW_VLAN_FILTER |
2076 | | FLAG_HAS_MSIX | 2076 | | FLAG_HAS_MSIX |
@@ -2091,7 +2091,7 @@ struct e1000_info e1000_82574_info = { | |||
2091 | .nvm_ops = &e82571_nvm_ops, | 2091 | .nvm_ops = &e82571_nvm_ops, |
2092 | }; | 2092 | }; |
2093 | 2093 | ||
2094 | struct e1000_info e1000_82583_info = { | 2094 | const struct e1000_info e1000_82583_info = { |
2095 | .mac = e1000_82583, | 2095 | .mac = e1000_82583, |
2096 | .flags = FLAG_HAS_HW_VLAN_FILTER | 2096 | .flags = FLAG_HAS_HW_VLAN_FILTER |
2097 | | FLAG_HAS_WOL | 2097 | | FLAG_HAS_WOL |
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h index 1b15d1ff583c..7877b9c26edb 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h | |||
@@ -406,9 +406,9 @@ struct e1000_info { | |||
406 | u32 pba; | 406 | u32 pba; |
407 | u32 max_hw_frame_size; | 407 | u32 max_hw_frame_size; |
408 | s32 (*get_variants)(struct e1000_adapter *); | 408 | s32 (*get_variants)(struct e1000_adapter *); |
409 | struct e1000_mac_operations *mac_ops; | 409 | const struct e1000_mac_operations *mac_ops; |
410 | struct e1000_phy_operations *phy_ops; | 410 | const struct e1000_phy_operations *phy_ops; |
411 | struct e1000_nvm_operations *nvm_ops; | 411 | const struct e1000_nvm_operations *nvm_ops; |
412 | }; | 412 | }; |
413 | 413 | ||
414 | /* hardware capability, feature, and workaround flags */ | 414 | /* hardware capability, feature, and workaround flags */ |
@@ -506,17 +506,17 @@ extern unsigned int copybreak; | |||
506 | 506 | ||
507 | extern char *e1000e_get_hw_dev_name(struct e1000_hw *hw); | 507 | extern char *e1000e_get_hw_dev_name(struct e1000_hw *hw); |
508 | 508 | ||
509 | extern struct e1000_info e1000_82571_info; | 509 | extern const struct e1000_info e1000_82571_info; |
510 | extern struct e1000_info e1000_82572_info; | 510 | extern const struct e1000_info e1000_82572_info; |
511 | extern struct e1000_info e1000_82573_info; | 511 | extern const struct e1000_info e1000_82573_info; |
512 | extern struct e1000_info e1000_82574_info; | 512 | extern const struct e1000_info e1000_82574_info; |
513 | extern struct e1000_info e1000_82583_info; | 513 | extern const struct e1000_info e1000_82583_info; |
514 | extern struct e1000_info e1000_ich8_info; | 514 | extern const struct e1000_info e1000_ich8_info; |
515 | extern struct e1000_info e1000_ich9_info; | 515 | extern const struct e1000_info e1000_ich9_info; |
516 | extern struct e1000_info e1000_ich10_info; | 516 | extern const struct e1000_info e1000_ich10_info; |
517 | extern struct e1000_info e1000_pch_info; | 517 | extern const struct e1000_info e1000_pch_info; |
518 | extern struct e1000_info e1000_pch2_info; | 518 | extern const struct e1000_info e1000_pch2_info; |
519 | extern struct e1000_info e1000_es2_info; | 519 | extern const struct e1000_info e1000_es2_info; |
520 | 520 | ||
521 | extern s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num, | 521 | extern s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num, |
522 | u32 pba_num_size); | 522 | u32 pba_num_size); |
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 3fc3acce9950..3b063e1ac835 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
@@ -4011,7 +4011,7 @@ release: | |||
4011 | } | 4011 | } |
4012 | } | 4012 | } |
4013 | 4013 | ||
4014 | static struct e1000_mac_operations ich8_mac_ops = { | 4014 | static const struct e1000_mac_operations ich8_mac_ops = { |
4015 | .id_led_init = e1000e_id_led_init, | 4015 | .id_led_init = e1000e_id_led_init, |
4016 | /* check_mng_mode dependent on mac type */ | 4016 | /* check_mng_mode dependent on mac type */ |
4017 | .check_for_link = e1000_check_for_copper_link_ich8lan, | 4017 | .check_for_link = e1000_check_for_copper_link_ich8lan, |
@@ -4030,7 +4030,7 @@ static struct e1000_mac_operations ich8_mac_ops = { | |||
4030 | /* id_led_init dependent on mac type */ | 4030 | /* id_led_init dependent on mac type */ |
4031 | }; | 4031 | }; |
4032 | 4032 | ||
4033 | static struct e1000_phy_operations ich8_phy_ops = { | 4033 | static const struct e1000_phy_operations ich8_phy_ops = { |
4034 | .acquire = e1000_acquire_swflag_ich8lan, | 4034 | .acquire = e1000_acquire_swflag_ich8lan, |
4035 | .check_reset_block = e1000_check_reset_block_ich8lan, | 4035 | .check_reset_block = e1000_check_reset_block_ich8lan, |
4036 | .commit = NULL, | 4036 | .commit = NULL, |
@@ -4044,7 +4044,7 @@ static struct e1000_phy_operations ich8_phy_ops = { | |||
4044 | .write_reg = e1000e_write_phy_reg_igp, | 4044 | .write_reg = e1000e_write_phy_reg_igp, |
4045 | }; | 4045 | }; |
4046 | 4046 | ||
4047 | static struct e1000_nvm_operations ich8_nvm_ops = { | 4047 | static const struct e1000_nvm_operations ich8_nvm_ops = { |
4048 | .acquire = e1000_acquire_nvm_ich8lan, | 4048 | .acquire = e1000_acquire_nvm_ich8lan, |
4049 | .read = e1000_read_nvm_ich8lan, | 4049 | .read = e1000_read_nvm_ich8lan, |
4050 | .release = e1000_release_nvm_ich8lan, | 4050 | .release = e1000_release_nvm_ich8lan, |
@@ -4054,7 +4054,7 @@ static struct e1000_nvm_operations ich8_nvm_ops = { | |||
4054 | .write = e1000_write_nvm_ich8lan, | 4054 | .write = e1000_write_nvm_ich8lan, |
4055 | }; | 4055 | }; |
4056 | 4056 | ||
4057 | struct e1000_info e1000_ich8_info = { | 4057 | const struct e1000_info e1000_ich8_info = { |
4058 | .mac = e1000_ich8lan, | 4058 | .mac = e1000_ich8lan, |
4059 | .flags = FLAG_HAS_WOL | 4059 | .flags = FLAG_HAS_WOL |
4060 | | FLAG_IS_ICH | 4060 | | FLAG_IS_ICH |
@@ -4070,7 +4070,7 @@ struct e1000_info e1000_ich8_info = { | |||
4070 | .nvm_ops = &ich8_nvm_ops, | 4070 | .nvm_ops = &ich8_nvm_ops, |
4071 | }; | 4071 | }; |
4072 | 4072 | ||
4073 | struct e1000_info e1000_ich9_info = { | 4073 | const struct e1000_info e1000_ich9_info = { |
4074 | .mac = e1000_ich9lan, | 4074 | .mac = e1000_ich9lan, |
4075 | .flags = FLAG_HAS_JUMBO_FRAMES | 4075 | .flags = FLAG_HAS_JUMBO_FRAMES |
4076 | | FLAG_IS_ICH | 4076 | | FLAG_IS_ICH |
@@ -4088,7 +4088,7 @@ struct e1000_info e1000_ich9_info = { | |||
4088 | .nvm_ops = &ich8_nvm_ops, | 4088 | .nvm_ops = &ich8_nvm_ops, |
4089 | }; | 4089 | }; |
4090 | 4090 | ||
4091 | struct e1000_info e1000_ich10_info = { | 4091 | const struct e1000_info e1000_ich10_info = { |
4092 | .mac = e1000_ich10lan, | 4092 | .mac = e1000_ich10lan, |
4093 | .flags = FLAG_HAS_JUMBO_FRAMES | 4093 | .flags = FLAG_HAS_JUMBO_FRAMES |
4094 | | FLAG_IS_ICH | 4094 | | FLAG_IS_ICH |
@@ -4106,7 +4106,7 @@ struct e1000_info e1000_ich10_info = { | |||
4106 | .nvm_ops = &ich8_nvm_ops, | 4106 | .nvm_ops = &ich8_nvm_ops, |
4107 | }; | 4107 | }; |
4108 | 4108 | ||
4109 | struct e1000_info e1000_pch_info = { | 4109 | const struct e1000_info e1000_pch_info = { |
4110 | .mac = e1000_pchlan, | 4110 | .mac = e1000_pchlan, |
4111 | .flags = FLAG_IS_ICH | 4111 | .flags = FLAG_IS_ICH |
4112 | | FLAG_HAS_WOL | 4112 | | FLAG_HAS_WOL |
@@ -4125,7 +4125,7 @@ struct e1000_info e1000_pch_info = { | |||
4125 | .nvm_ops = &ich8_nvm_ops, | 4125 | .nvm_ops = &ich8_nvm_ops, |
4126 | }; | 4126 | }; |
4127 | 4127 | ||
4128 | struct e1000_info e1000_pch2_info = { | 4128 | const struct e1000_info e1000_pch2_info = { |
4129 | .mac = e1000_pch2lan, | 4129 | .mac = e1000_pch2lan, |
4130 | .flags = FLAG_IS_ICH | 4130 | .flags = FLAG_IS_ICH |
4131 | | FLAG_HAS_WOL | 4131 | | FLAG_HAS_WOL |