]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
e1000e: cleanup: rename e1000e_id_led_init() and call as function pointer
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 22 Feb 2012 09:02:21 +0000 (09:02 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 25 Feb 2012 05:32:49 +0000 (21:32 -0800)
Rename e1000e_id_led_init() to e1000e_id_led_init_generic() to signify the
function is used for more than one MAC-family type.  For the ich8lan MAC
family, some MACs use the generic function and others use the function
e1000_id_led_init_pchlan().  In all cases where e1000e_id_led_init() was
called directly, change to call the function pointer to be consistent with
the driver design.

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>
drivers/net/ethernet/intel/e1000e/80003es2lan.c
drivers/net/ethernet/intel/e1000e/82571.c
drivers/net/ethernet/intel/e1000e/e1000.h
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/mac.c

index 1f8f8524d8636c714f566d4b8e44985912365477..c1464845439d871a9a25df85a02c568bb81d40c1 100644 (file)
@@ -820,7 +820,7 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
        e1000_initialize_hw_bits_80003es2lan(hw);
 
        /* Initialize identification LED */
-       ret_val = e1000e_id_led_init(hw);
+       ret_val = mac->ops.id_led_init(hw);
        if (ret_val)
                e_dbg("Error initializing identification LED\n");
                /* This is not fatal and we should not stop init due to this */
@@ -1413,7 +1413,7 @@ static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw)
 
 static const struct e1000_mac_operations es2_mac_ops = {
        .read_mac_addr          = e1000_read_mac_addr_80003es2lan,
-       .id_led_init            = e1000e_id_led_init,
+       .id_led_init            = e1000e_id_led_init_generic,
        .blink_led              = e1000e_blink_led_generic,
        .check_mng_mode         = e1000e_check_mng_mode_generic,
        /* check_for_link dependent on media type */
index b6b7bc4c33aafa9faad7ef3894e12edb3d8098c3..2ca6377bd01569be91c2118374706c4ceb35e0f8 100644 (file)
@@ -1118,7 +1118,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
        e1000_initialize_hw_bits_82571(hw);
 
        /* Initialize identification LED */
-       ret_val = e1000e_id_led_init(hw);
+       ret_val = mac->ops.id_led_init(hw);
        if (ret_val)
                e_dbg("Error initializing identification LED\n");
                /* This is not fatal and we should not stop init due to this */
@@ -1911,7 +1911,7 @@ static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw)
 static const struct e1000_mac_operations e82571_mac_ops = {
        /* .check_mng_mode: mac type dependent */
        /* .check_for_link: media type dependent */
-       .id_led_init            = e1000e_id_led_init,
+       .id_led_init            = e1000e_id_led_init_generic,
        .cleanup_led            = e1000e_cleanup_led_generic,
        .clear_hw_cntrs         = e1000_clear_hw_cntrs_82571,
        .get_bus_info           = e1000e_get_bus_info_pcie,
index 04a21fcb827e6fd03f4f3851a5799c7041c207fe..2a0d658b596c41adf76627ef8b2240a9be7f08f8 100644 (file)
@@ -559,7 +559,7 @@ extern s32 e1000e_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed, u
 extern s32 e1000e_get_speed_and_duplex_fiber_serdes(struct e1000_hw *hw, u16 *speed, u16 *duplex);
 extern s32 e1000e_disable_pcie_master(struct e1000_hw *hw);
 extern s32 e1000e_get_auto_rd_done(struct e1000_hw *hw);
-extern s32 e1000e_id_led_init(struct e1000_hw *hw);
+extern s32 e1000e_id_led_init_generic(struct e1000_hw *hw);
 extern void e1000e_clear_hw_cntrs_base(struct e1000_hw *hw);
 extern s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw);
 extern s32 e1000e_copper_link_setup_m88(struct e1000_hw *hw);
index f3282dc5588ed29fc237bdb96b0b188d0d0852cb..7d3a7fb11dd373f32a6c21a951d5c1be2f594bbc 100644 (file)
@@ -580,7 +580,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
                /* check management mode */
                mac->ops.check_mng_mode = e1000_check_mng_mode_ich8lan;
                /* ID LED init */
-               mac->ops.id_led_init = e1000e_id_led_init;
+               mac->ops.id_led_init = e1000e_id_led_init_generic;
                /* blink LED */
                mac->ops.blink_led = e1000e_blink_led_generic;
                /* setup LED */
@@ -2962,7 +2962,7 @@ static s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw, u16 *data)
  *
  *  PCH also does not have an "always on" or "always off" mode which
  *  complicates the ID feature.  Instead of using the "on" mode to indicate
- *  in ledctl_mode2 the LEDs to use for ID (see e1000e_id_led_init()),
+ *  in ledctl_mode2 the LEDs to use for ID (see e1000e_id_led_init_generic()),
  *  use "link_up" mode.  The LEDs will still ID on request if there is no
  *  link based on logic in e1000_led_[on|off]_pchlan().
  **/
@@ -4006,7 +4006,6 @@ release:
 }
 
 static const struct e1000_mac_operations ich8_mac_ops = {
-       .id_led_init            = e1000e_id_led_init,
        /* check_mng_mode dependent on mac type */
        .check_for_link         = e1000_check_for_copper_link_ich8lan,
        /* cleanup_led dependent on mac type */
index 17991e63083d628856c5b4d5f3d810c97868bb15..aaf4a4d731b64b88fb1ae7f438f6b19298c679b3 100644 (file)
@@ -1399,11 +1399,11 @@ s32 e1000e_valid_led_default(struct e1000_hw *hw, u16 *data)
 }
 
 /**
- *  e1000e_id_led_init -
+ *  e1000e_id_led_init_generic -
  *  @hw: pointer to the HW structure
  *
  **/
-s32 e1000e_id_led_init(struct e1000_hw *hw)
+s32 e1000e_id_led_init_generic(struct e1000_hw *hw)
 {
        struct e1000_mac_info *mac = &hw->mac;
        s32 ret_val;