]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
igb: constify e1000_phy_operations structure
authorJulia Lawall <julia.lawall@lip6.fr>
Sun, 3 Jan 2016 06:44:56 +0000 (07:44 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 24 Feb 2016 23:11:07 +0000 (15:11 -0800)
This e1000_phy_operations structure is never modified, so declare it as
const.  Other structures of this type are already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/e1000_82575.c
drivers/net/ethernet/intel/igb/e1000_hw.h

index 9a1a9c7b0748d694564d27947c87966b2ccc53e2..a23aa6704394b46fd3d7530f6ea8fadd48dd431b 100644 (file)
@@ -2920,7 +2920,7 @@ static struct e1000_mac_operations e1000_mac_ops_82575 = {
 #endif
 };
 
-static struct e1000_phy_operations e1000_phy_ops_82575 = {
+static const struct e1000_phy_operations e1000_phy_ops_82575 = {
        .acquire              = igb_acquire_phy_82575,
        .get_cfg_done         = igb_get_cfg_done_82575,
        .release              = igb_release_phy_82575,
index f0c416e21d2cfa61c1bc239638e32947d4ce94e2..2fb2213cd562e84df0bcd42f55618e76133fe922 100644 (file)
@@ -372,7 +372,7 @@ struct e1000_thermal_sensor_data {
 struct e1000_info {
        s32 (*get_invariants)(struct e1000_hw *);
        struct e1000_mac_operations *mac_ops;
-       struct e1000_phy_operations *phy_ops;
+       const struct e1000_phy_operations *phy_ops;
        struct e1000_nvm_operations *nvm_ops;
 };