diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-09-02 04:03:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-02 04:03:33 -0400 |
commit | 0fc0b732eaa38beb93a6fb62f77c7bd9622c76ec (patch) | |
tree | 2423b134116c16f027ebeae7954c098f27d6e619 | |
parent | daf09de817353f18bb81a23a023d429cfd258e62 (diff) |
netdev: drivers should make ethtool_ops const
No need to put ethtool_ops in data, they should be const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
50 files changed, 54 insertions, 54 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 4c75409bc09c..f114813ae258 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -285,7 +285,7 @@ static void uml_net_get_drvinfo(struct net_device *dev, | |||
285 | strcpy(info->version, "42"); | 285 | strcpy(info->version, "42"); |
286 | } | 286 | } |
287 | 287 | ||
288 | static struct ethtool_ops uml_net_ethtool_ops = { | 288 | static const struct ethtool_ops uml_net_ethtool_ops = { |
289 | .get_drvinfo = uml_net_get_drvinfo, | 289 | .get_drvinfo = uml_net_get_drvinfo, |
290 | .get_link = ethtool_op_get_link, | 290 | .get_link = ethtool_op_get_link, |
291 | }; | 291 | }; |
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index d923d1dc458f..84edc8b84c62 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
@@ -1342,7 +1342,7 @@ static void fwnet_get_drvinfo(struct net_device *net, | |||
1342 | strcpy(info->bus_info, "ieee1394"); | 1342 | strcpy(info->bus_info, "ieee1394"); |
1343 | } | 1343 | } |
1344 | 1344 | ||
1345 | static struct ethtool_ops fwnet_ethtool_ops = { | 1345 | static const struct ethtool_ops fwnet_ethtool_ops = { |
1346 | .get_drvinfo = fwnet_get_drvinfo, | 1346 | .get_drvinfo = fwnet_get_drvinfo, |
1347 | }; | 1347 | }; |
1348 | 1348 | ||
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 1ad8785e398b..3a62c4c2d419 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -173,7 +173,7 @@ static netdev_tx_t ether1394_tx(struct sk_buff *skb, | |||
173 | struct net_device *dev); | 173 | struct net_device *dev); |
174 | static void ether1394_iso(struct hpsb_iso *iso); | 174 | static void ether1394_iso(struct hpsb_iso *iso); |
175 | 175 | ||
176 | static struct ethtool_ops ethtool_ops; | 176 | static const struct ethtool_ops ethtool_ops; |
177 | 177 | ||
178 | static int ether1394_write(struct hpsb_host *host, int srcid, int destid, | 178 | static int ether1394_write(struct hpsb_host *host, int srcid, int destid, |
179 | quadlet_t *data, u64 addr, size_t len, u16 flags); | 179 | quadlet_t *data, u64 addr, size_t len, u16 flags); |
@@ -1706,7 +1706,7 @@ static void ether1394_get_drvinfo(struct net_device *dev, | |||
1706 | strcpy(info->bus_info, "ieee1394"); /* FIXME provide more detail? */ | 1706 | strcpy(info->bus_info, "ieee1394"); /* FIXME provide more detail? */ |
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | static struct ethtool_ops ethtool_ops = { | 1709 | static const struct ethtool_ops ethtool_ops = { |
1710 | .get_drvinfo = ether1394_get_drvinfo | 1710 | .get_drvinfo = ether1394_get_drvinfo |
1711 | }; | 1711 | }; |
1712 | 1712 | ||
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index c6e6611d3016..538e409d4515 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -1508,7 +1508,7 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd | |||
1508 | } | 1508 | } |
1509 | 1509 | ||
1510 | 1510 | ||
1511 | static struct ethtool_ops nes_ethtool_ops = { | 1511 | static const struct ethtool_ops nes_ethtool_ops = { |
1512 | .get_link = ethtool_op_get_link, | 1512 | .get_link = ethtool_op_get_link, |
1513 | .get_settings = nes_netdev_get_settings, | 1513 | .get_settings = nes_netdev_get_settings, |
1514 | .set_settings = nes_netdev_set_settings, | 1514 | .set_settings = nes_netdev_set_settings, |
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index fbf4645417d4..2be49c817995 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -762,7 +762,7 @@ static u32 ep93xx_get_link(struct net_device *dev) | |||
762 | return mii_link_ok(&ep->mii); | 762 | return mii_link_ok(&ep->mii); |
763 | } | 763 | } |
764 | 764 | ||
765 | static struct ethtool_ops ep93xx_ethtool_ops = { | 765 | static const struct ethtool_ops ep93xx_ethtool_ops = { |
766 | .get_drvinfo = ep93xx_get_drvinfo, | 766 | .get_drvinfo = ep93xx_get_drvinfo, |
767 | .get_settings = ep93xx_get_settings, | 767 | .get_settings = ep93xx_get_settings, |
768 | .set_settings = ep93xx_set_settings, | 768 | .set_settings = ep93xx_set_settings, |
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 3fe09876e76d..691b81eb0f46 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -802,7 +802,7 @@ static int ixp4xx_nway_reset(struct net_device *dev) | |||
802 | return phy_start_aneg(port->phydev); | 802 | return phy_start_aneg(port->phydev); |
803 | } | 803 | } |
804 | 804 | ||
805 | static struct ethtool_ops ixp4xx_ethtool_ops = { | 805 | static const struct ethtool_ops ixp4xx_ethtool_ops = { |
806 | .get_drvinfo = ixp4xx_get_drvinfo, | 806 | .get_drvinfo = ixp4xx_get_drvinfo, |
807 | .get_settings = ixp4xx_get_settings, | 807 | .get_settings = ixp4xx_get_settings, |
808 | .set_settings = ixp4xx_set_settings, | 808 | .set_settings = ixp4xx_set_settings, |
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index 35cd264abae7..4f702d52606a 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c | |||
@@ -1063,7 +1063,7 @@ ks8695_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *info) | |||
1063 | sizeof(info->bus_info)); | 1063 | sizeof(info->bus_info)); |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | static struct ethtool_ops ks8695_ethtool_ops = { | 1066 | static const struct ethtool_ops ks8695_ethtool_ops = { |
1067 | .get_msglevel = ks8695_get_msglevel, | 1067 | .get_msglevel = ks8695_get_msglevel, |
1068 | .set_msglevel = ks8695_set_msglevel, | 1068 | .set_msglevel = ks8695_set_msglevel, |
1069 | .get_settings = ks8695_get_settings, | 1069 | .get_settings = ks8695_get_settings, |
diff --git a/drivers/net/atl1c/atl1c_ethtool.c b/drivers/net/atl1c/atl1c_ethtool.c index 00d11b480af3..9b1e0eaebb5c 100644 --- a/drivers/net/atl1c/atl1c_ethtool.c +++ b/drivers/net/atl1c/atl1c_ethtool.c | |||
@@ -294,7 +294,7 @@ static int atl1c_nway_reset(struct net_device *netdev) | |||
294 | return 0; | 294 | return 0; |
295 | } | 295 | } |
296 | 296 | ||
297 | static struct ethtool_ops atl1c_ethtool_ops = { | 297 | static const struct ethtool_ops atl1c_ethtool_ops = { |
298 | .get_settings = atl1c_get_settings, | 298 | .get_settings = atl1c_get_settings, |
299 | .set_settings = atl1c_set_settings, | 299 | .set_settings = atl1c_set_settings, |
300 | .get_drvinfo = atl1c_get_drvinfo, | 300 | .get_drvinfo = atl1c_get_drvinfo, |
diff --git a/drivers/net/atl1e/atl1e_ethtool.c b/drivers/net/atl1e/atl1e_ethtool.c index 4003955d7a96..60edb9f232bb 100644 --- a/drivers/net/atl1e/atl1e_ethtool.c +++ b/drivers/net/atl1e/atl1e_ethtool.c | |||
@@ -378,7 +378,7 @@ static int atl1e_nway_reset(struct net_device *netdev) | |||
378 | return 0; | 378 | return 0; |
379 | } | 379 | } |
380 | 380 | ||
381 | static struct ethtool_ops atl1e_ethtool_ops = { | 381 | static const struct ethtool_ops atl1e_ethtool_ops = { |
382 | .get_settings = atl1e_get_settings, | 382 | .get_settings = atl1e_get_settings, |
383 | .set_settings = atl1e_set_settings, | 383 | .set_settings = atl1e_set_settings, |
384 | .get_drvinfo = atl1e_get_drvinfo, | 384 | .get_drvinfo = atl1e_get_drvinfo, |
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index d0bcb572d51e..10c06b97001f 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
@@ -2094,7 +2094,7 @@ static int atl2_nway_reset(struct net_device *netdev) | |||
2094 | return 0; | 2094 | return 0; |
2095 | } | 2095 | } |
2096 | 2096 | ||
2097 | static struct ethtool_ops atl2_ethtool_ops = { | 2097 | static const struct ethtool_ops atl2_ethtool_ops = { |
2098 | .get_settings = atl2_get_settings, | 2098 | .get_settings = atl2_get_settings, |
2099 | .set_settings = atl2_set_settings, | 2099 | .set_settings = atl2_set_settings, |
2100 | .get_drvinfo = atl2_get_drvinfo, | 2100 | .get_drvinfo = atl2_get_drvinfo, |
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index beb131399231..6c45a2233d0d 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -259,7 +259,7 @@ struct be_adapter { | |||
259 | bool promiscuous; | 259 | bool promiscuous; |
260 | }; | 260 | }; |
261 | 261 | ||
262 | extern struct ethtool_ops be_ethtool_ops; | 262 | extern const struct ethtool_ops be_ethtool_ops; |
263 | 263 | ||
264 | #define drvr_stats(adapter) (&adapter->stats.drvr_stats) | 264 | #define drvr_stats(adapter) (&adapter->stats.drvr_stats) |
265 | 265 | ||
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c index c480c19200d7..4ff3cc465406 100644 --- a/drivers/net/benet/be_ethtool.c +++ b/drivers/net/benet/be_ethtool.c | |||
@@ -332,7 +332,7 @@ be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) | |||
332 | return status; | 332 | return status; |
333 | } | 333 | } |
334 | 334 | ||
335 | struct ethtool_ops be_ethtool_ops = { | 335 | const struct ethtool_ops be_ethtool_ops = { |
336 | .get_settings = be_get_settings, | 336 | .get_settings = be_get_settings, |
337 | .get_drvinfo = be_get_drvinfo, | 337 | .get_drvinfo = be_get_drvinfo, |
338 | .get_link = ethtool_op_get_link, | 338 | .get_link = ethtool_op_get_link, |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index f580b21eabd1..14bd3801f7d3 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -491,7 +491,7 @@ static void bfin_mac_ethtool_getdrvinfo(struct net_device *dev, | |||
491 | strcpy(info->bus_info, dev_name(&dev->dev)); | 491 | strcpy(info->bus_info, dev_name(&dev->dev)); |
492 | } | 492 | } |
493 | 493 | ||
494 | static struct ethtool_ops bfin_mac_ethtool_ops = { | 494 | static const struct ethtool_ops bfin_mac_ethtool_ops = { |
495 | .get_settings = bfin_mac_ethtool_getsettings, | 495 | .get_settings = bfin_mac_ethtool_getsettings, |
496 | .set_settings = bfin_mac_ethtool_setsettings, | 496 | .set_settings = bfin_mac_ethtool_setsettings, |
497 | .get_link = ethtool_op_get_link, | 497 | .get_link = ethtool_op_get_link, |
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index e2e50267cc64..20f0ed956df2 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -10606,7 +10606,7 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data) | |||
10606 | return 0; | 10606 | return 0; |
10607 | } | 10607 | } |
10608 | 10608 | ||
10609 | static struct ethtool_ops bnx2x_ethtool_ops = { | 10609 | static const struct ethtool_ops bnx2x_ethtool_ops = { |
10610 | .get_settings = bnx2x_get_settings, | 10610 | .get_settings = bnx2x_get_settings, |
10611 | .set_settings = bnx2x_set_settings, | 10611 | .set_settings = bnx2x_set_settings, |
10612 | .get_drvinfo = bnx2x_get_drvinfo, | 10612 | .get_drvinfo = bnx2x_get_drvinfo, |
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 49912eb2a338..2ea036333db2 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -256,7 +256,7 @@ static void enic_set_msglevel(struct net_device *netdev, u32 value) | |||
256 | enic->msg_enable = value; | 256 | enic->msg_enable = value; |
257 | } | 257 | } |
258 | 258 | ||
259 | static struct ethtool_ops enic_ethtool_ops = { | 259 | static const struct ethtool_ops enic_ethtool_ops = { |
260 | .get_settings = enic_get_settings, | 260 | .get_settings = enic_get_settings, |
261 | .get_drvinfo = enic_get_drvinfo, | 261 | .get_drvinfo = enic_get_drvinfo, |
262 | .get_msglevel = enic_get_msglevel, | 262 | .get_msglevel = enic_get_msglevel, |
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index 114ccab1f2be..d004c359244c 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -2016,7 +2016,7 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data) | |||
2016 | } | 2016 | } |
2017 | } | 2017 | } |
2018 | 2018 | ||
2019 | static struct ethtool_ops igb_ethtool_ops = { | 2019 | static const struct ethtool_ops igb_ethtool_ops = { |
2020 | .get_settings = igb_get_settings, | 2020 | .get_settings = igb_get_settings, |
2021 | .set_settings = igb_set_settings, | 2021 | .set_settings = igb_set_settings, |
2022 | .get_drvinfo = igb_get_drvinfo, | 2022 | .get_drvinfo = igb_get_drvinfo, |
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c index 382c5532e6c5..9f7b5d4172b8 100644 --- a/drivers/net/ipg.c +++ b/drivers/net/ipg.c | |||
@@ -2186,7 +2186,7 @@ static int ipg_nway_reset(struct net_device *dev) | |||
2186 | return rc; | 2186 | return rc; |
2187 | } | 2187 | } |
2188 | 2188 | ||
2189 | static struct ethtool_ops ipg_ethtool_ops = { | 2189 | static const struct ethtool_ops ipg_ethtool_ops = { |
2190 | .get_settings = ipg_get_settings, | 2190 | .get_settings = ipg_get_settings, |
2191 | .set_settings = ipg_set_settings, | 2191 | .set_settings = ipg_set_settings, |
2192 | .nway_reset = ipg_nway_reset, | 2192 | .nway_reset = ipg_nway_reset, |
diff --git a/drivers/net/korina.c b/drivers/net/korina.c index 51ca54c8ec57..03199fa10003 100644 --- a/drivers/net/korina.c +++ b/drivers/net/korina.c | |||
@@ -743,7 +743,7 @@ static u32 netdev_get_link(struct net_device *dev) | |||
743 | return mii_link_ok(&lp->mii_if); | 743 | return mii_link_ok(&lp->mii_if); |
744 | } | 744 | } |
745 | 745 | ||
746 | static struct ethtool_ops netdev_ethtool_ops = { | 746 | static const struct ethtool_ops netdev_ethtool_ops = { |
747 | .get_drvinfo = netdev_get_drvinfo, | 747 | .get_drvinfo = netdev_get_drvinfo, |
748 | .get_settings = netdev_get_settings, | 748 | .get_settings = netdev_get_settings, |
749 | .set_settings = netdev_set_settings, | 749 | .set_settings = netdev_set_settings, |
diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c index 6e74aa9eea44..99e954167fa6 100644 --- a/drivers/net/ks8842.c +++ b/drivers/net/ks8842.c | |||
@@ -619,7 +619,7 @@ static const struct net_device_ops ks8842_netdev_ops = { | |||
619 | .ndo_validate_addr = eth_validate_addr | 619 | .ndo_validate_addr = eth_validate_addr |
620 | }; | 620 | }; |
621 | 621 | ||
622 | static struct ethtool_ops ks8842_ethtool_ops = { | 622 | static const struct ethtool_ops ks8842_ethtool_ops = { |
623 | .get_link = ethtool_op_get_link, | 623 | .get_link = ethtool_op_get_link, |
624 | }; | 624 | }; |
625 | 625 | ||
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 01aaca99d29f..fb65b427c692 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -1079,7 +1079,7 @@ static void macb_get_drvinfo(struct net_device *dev, | |||
1079 | strcpy(info->bus_info, dev_name(&bp->pdev->dev)); | 1079 | strcpy(info->bus_info, dev_name(&bp->pdev->dev)); |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | static struct ethtool_ops macb_ethtool_ops = { | 1082 | static const struct ethtool_ops macb_ethtool_ops = { |
1083 | .get_settings = macb_get_settings, | 1083 | .get_settings = macb_get_settings, |
1084 | .set_settings = macb_set_settings, | 1084 | .set_settings = macb_set_settings, |
1085 | .get_drvinfo = macb_get_drvinfo, | 1085 | .get_drvinfo = macb_get_drvinfo, |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 449d3511628f..224a74691312 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -1410,6 +1410,6 @@ extern void netxen_change_ringparam(struct netxen_adapter *adapter); | |||
1410 | extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr, | 1410 | extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr, |
1411 | int *valp); | 1411 | int *valp); |
1412 | 1412 | ||
1413 | extern struct ethtool_ops netxen_nic_ethtool_ops; | 1413 | extern const struct ethtool_ops netxen_nic_ethtool_ops; |
1414 | 1414 | ||
1415 | #endif /* __NETXEN_NIC_H_ */ | 1415 | #endif /* __NETXEN_NIC_H_ */ |
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 3886135006e1..e376a1c4eb06 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c | |||
@@ -963,7 +963,7 @@ static int netxen_nic_set_flags(struct net_device *netdev, u32 data) | |||
963 | return 0; | 963 | return 0; |
964 | } | 964 | } |
965 | 965 | ||
966 | struct ethtool_ops netxen_nic_ethtool_ops = { | 966 | const struct ethtool_ops netxen_nic_ethtool_ops = { |
967 | .get_settings = netxen_nic_get_settings, | 967 | .get_settings = netxen_nic_get_settings, |
968 | .set_settings = netxen_nic_set_settings, | 968 | .set_settings = netxen_nic_set_settings, |
969 | .get_drvinfo = netxen_nic_get_drvinfo, | 969 | .get_drvinfo = netxen_nic_get_drvinfo, |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index a3932c9f3406..b211613e9dbd 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -1346,7 +1346,7 @@ done: | |||
1346 | return status; | 1346 | return status; |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | static struct ethtool_ops gelic_ether_ethtool_ops = { | 1349 | static const struct ethtool_ops gelic_ether_ethtool_ops = { |
1350 | .get_drvinfo = gelic_net_get_drvinfo, | 1350 | .get_drvinfo = gelic_net_get_drvinfo, |
1351 | .get_settings = gelic_ether_get_settings, | 1351 | .get_settings = gelic_ether_get_settings, |
1352 | .get_link = ethtool_op_get_link, | 1352 | .get_link = ethtool_op_get_link, |
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index 6932b08d746b..227b141c4fbd 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
@@ -2714,7 +2714,7 @@ static const struct net_device_ops gelic_wl_netdevice_ops = { | |||
2714 | #endif | 2714 | #endif |
2715 | }; | 2715 | }; |
2716 | 2716 | ||
2717 | static struct ethtool_ops gelic_wl_ethtool_ops = { | 2717 | static const struct ethtool_ops gelic_wl_ethtool_ops = { |
2718 | .get_drvinfo = gelic_net_get_drvinfo, | 2718 | .get_drvinfo = gelic_net_get_drvinfo, |
2719 | .get_link = gelic_wl_get_link, | 2719 | .get_link = gelic_wl_get_link, |
2720 | .get_tx_csum = ethtool_op_get_tx_csum, | 2720 | .get_tx_csum = ethtool_op_get_tx_csum, |
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 997ea2a3d53f..45018f283ffa 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -731,7 +731,7 @@ static void efx_ethtool_get_pauseparam(struct net_device *net_dev, | |||
731 | } | 731 | } |
732 | 732 | ||
733 | 733 | ||
734 | struct ethtool_ops efx_ethtool_ops = { | 734 | const struct ethtool_ops efx_ethtool_ops = { |
735 | .get_settings = efx_ethtool_get_settings, | 735 | .get_settings = efx_ethtool_get_settings, |
736 | .set_settings = efx_ethtool_set_settings, | 736 | .set_settings = efx_ethtool_set_settings, |
737 | .get_drvinfo = efx_ethtool_get_drvinfo, | 737 | .get_drvinfo = efx_ethtool_get_drvinfo, |
diff --git a/drivers/net/sfc/ethtool.h b/drivers/net/sfc/ethtool.h index 3628e43df14d..295ead403356 100644 --- a/drivers/net/sfc/ethtool.h +++ b/drivers/net/sfc/ethtool.h | |||
@@ -22,6 +22,6 @@ extern int efx_ethtool_get_settings(struct net_device *net_dev, | |||
22 | extern int efx_ethtool_set_settings(struct net_device *net_dev, | 22 | extern int efx_ethtool_set_settings(struct net_device *net_dev, |
23 | struct ethtool_cmd *ecmd); | 23 | struct ethtool_cmd *ecmd); |
24 | 24 | ||
25 | extern struct ethtool_ops efx_ethtool_ops; | 25 | extern const struct ethtool_ops efx_ethtool_ops; |
26 | 26 | ||
27 | #endif /* EFX_ETHTOOL_H */ | 27 | #endif /* EFX_ETHTOOL_H */ |
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index 918d4c9e49b3..ec9dfb251f30 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c | |||
@@ -2428,7 +2428,7 @@ static void bdx_get_ethtool_stats(struct net_device *netdev, | |||
2428 | */ | 2428 | */ |
2429 | static void bdx_ethtool_ops(struct net_device *netdev) | 2429 | static void bdx_ethtool_ops(struct net_device *netdev) |
2430 | { | 2430 | { |
2431 | static struct ethtool_ops bdx_ethtool_ops = { | 2431 | static const struct ethtool_ops bdx_ethtool_ops = { |
2432 | .get_settings = bdx_get_settings, | 2432 | .get_settings = bdx_get_settings, |
2433 | .get_drvinfo = bdx_get_drvinfo, | 2433 | .get_drvinfo = bdx_get_drvinfo, |
2434 | .get_link = ethtool_op_get_link, | 2434 | .get_link = ethtool_op_get_link, |
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 87b4a0289919..6ce7f775bb74 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -731,7 +731,7 @@ static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd) | |||
731 | /* We need to override some ethtool_ops so we require our | 731 | /* We need to override some ethtool_ops so we require our |
732 | own structure so we don't interfere with other usbnet | 732 | own structure so we don't interfere with other usbnet |
733 | devices that may be connected at the same time. */ | 733 | devices that may be connected at the same time. */ |
734 | static struct ethtool_ops ax88172_ethtool_ops = { | 734 | static const struct ethtool_ops ax88172_ethtool_ops = { |
735 | .get_drvinfo = asix_get_drvinfo, | 735 | .get_drvinfo = asix_get_drvinfo, |
736 | .get_link = asix_get_link, | 736 | .get_link = asix_get_link, |
737 | .get_msglevel = usbnet_get_msglevel, | 737 | .get_msglevel = usbnet_get_msglevel, |
@@ -873,7 +873,7 @@ out: | |||
873 | return ret; | 873 | return ret; |
874 | } | 874 | } |
875 | 875 | ||
876 | static struct ethtool_ops ax88772_ethtool_ops = { | 876 | static const struct ethtool_ops ax88772_ethtool_ops = { |
877 | .get_drvinfo = asix_get_drvinfo, | 877 | .get_drvinfo = asix_get_drvinfo, |
878 | .get_link = asix_get_link, | 878 | .get_link = asix_get_link, |
879 | .get_msglevel = usbnet_get_msglevel, | 879 | .get_msglevel = usbnet_get_msglevel, |
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 0ffc0c6d03be..2bed6b087d16 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -698,7 +698,7 @@ static int catc_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
698 | return 0; | 698 | return 0; |
699 | } | 699 | } |
700 | 700 | ||
701 | static struct ethtool_ops ops = { | 701 | static const struct ethtool_ops ops = { |
702 | .get_drvinfo = catc_get_drvinfo, | 702 | .get_drvinfo = catc_get_drvinfo, |
703 | .get_settings = catc_get_settings, | 703 | .get_settings = catc_get_settings, |
704 | .get_link = ethtool_op_get_link | 704 | .get_link = ethtool_op_get_link |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 1d3730d6690f..72470f77f556 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -356,7 +356,7 @@ static int dm9601_ioctl(struct net_device *net, struct ifreq *rq, int cmd) | |||
356 | return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); | 356 | return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); |
357 | } | 357 | } |
358 | 358 | ||
359 | static struct ethtool_ops dm9601_ethtool_ops = { | 359 | static const struct ethtool_ops dm9601_ethtool_ops = { |
360 | .get_drvinfo = dm9601_get_drvinfo, | 360 | .get_drvinfo = dm9601_get_drvinfo, |
361 | .get_link = dm9601_get_link, | 361 | .get_link = dm9601_get_link, |
362 | .get_msglevel = usbnet_get_msglevel, | 362 | .get_msglevel = usbnet_get_msglevel, |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 123f9b84dd29..3f9c92a2afcb 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -829,7 +829,7 @@ static void hso_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info | |||
829 | usb_make_path(odev->parent->usb, info->bus_info, sizeof info->bus_info); | 829 | usb_make_path(odev->parent->usb, info->bus_info, sizeof info->bus_info); |
830 | } | 830 | } |
831 | 831 | ||
832 | static struct ethtool_ops ops = { | 832 | static const struct ethtool_ops ops = { |
833 | .get_drvinfo = hso_get_drvinfo, | 833 | .get_drvinfo = hso_get_drvinfo, |
834 | .get_link = ethtool_op_get_link | 834 | .get_link = ethtool_op_get_link |
835 | }; | 835 | }; |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 7f397365b437..e2a39b9be96e 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -778,7 +778,7 @@ static u32 kaweth_get_link(struct net_device *dev) | |||
778 | return kaweth->linkstate; | 778 | return kaweth->linkstate; |
779 | } | 779 | } |
780 | 780 | ||
781 | static struct ethtool_ops ops = { | 781 | static const struct ethtool_ops ops = { |
782 | .get_drvinfo = kaweth_get_drvinfo, | 782 | .get_drvinfo = kaweth_get_drvinfo, |
783 | .get_link = kaweth_get_link | 783 | .get_link = kaweth_get_link |
784 | }; | 784 | }; |
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index 7ae9afe99a4f..10873d96b2da 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c | |||
@@ -449,7 +449,7 @@ static void mcs7830_get_regs(struct net_device *net, struct ethtool_regs *regs, | |||
449 | mcs7830_get_reg(dev, 0, regs->len, data); | 449 | mcs7830_get_reg(dev, 0, regs->len, data); |
450 | } | 450 | } |
451 | 451 | ||
452 | static struct ethtool_ops mcs7830_ethtool_ops = { | 452 | static const struct ethtool_ops mcs7830_ethtool_ops = { |
453 | .get_drvinfo = mcs7830_get_drvinfo, | 453 | .get_drvinfo = mcs7830_get_drvinfo, |
454 | .get_regs_len = mcs7830_get_regs_len, | 454 | .get_regs_len = mcs7830_get_regs_len, |
455 | .get_regs = mcs7830_get_regs, | 455 | .get_regs = mcs7830_get_regs, |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 7b935b846424..6fdaba8674b9 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -1174,7 +1174,7 @@ static void pegasus_set_msglevel(struct net_device *dev, u32 v) | |||
1174 | pegasus->msg_enable = v; | 1174 | pegasus->msg_enable = v; |
1175 | } | 1175 | } |
1176 | 1176 | ||
1177 | static struct ethtool_ops ops = { | 1177 | static const struct ethtool_ops ops = { |
1178 | .get_drvinfo = pegasus_get_drvinfo, | 1178 | .get_drvinfo = pegasus_get_drvinfo, |
1179 | .get_settings = pegasus_get_settings, | 1179 | .get_settings = pegasus_get_settings, |
1180 | .set_settings = pegasus_set_settings, | 1180 | .set_settings = pegasus_set_settings, |
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index d9f84f22fbc7..b091e20ca167 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c | |||
@@ -865,7 +865,7 @@ static int rtl8150_get_settings(struct net_device *netdev, struct ethtool_cmd *e | |||
865 | return 0; | 865 | return 0; |
866 | } | 866 | } |
867 | 867 | ||
868 | static struct ethtool_ops ops = { | 868 | static const struct ethtool_ops ops = { |
869 | .get_drvinfo = rtl8150_get_drvinfo, | 869 | .get_drvinfo = rtl8150_get_drvinfo, |
870 | .get_settings = rtl8150_get_settings, | 870 | .get_settings = rtl8150_get_settings, |
871 | .get_link = ethtool_op_get_link | 871 | .get_link = ethtool_op_get_link |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 09bd6351f64c..938fb3530a7a 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -625,7 +625,7 @@ static int smsc95xx_ethtool_set_tx_csum(struct net_device *netdev, u32 val) | |||
625 | return smsc95xx_set_csums(dev); | 625 | return smsc95xx_set_csums(dev); |
626 | } | 626 | } |
627 | 627 | ||
628 | static struct ethtool_ops smsc95xx_ethtool_ops = { | 628 | static const struct ethtool_ops smsc95xx_ethtool_ops = { |
629 | .get_link = usbnet_get_link, | 629 | .get_link = usbnet_get_link, |
630 | .nway_reset = usbnet_nway_reset, | 630 | .nway_reset = usbnet_nway_reset, |
631 | .get_drvinfo = usbnet_get_drvinfo, | 631 | .get_drvinfo = usbnet_get_drvinfo, |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index d166e3385c64..24b36f795151 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -854,7 +854,7 @@ void usbnet_set_msglevel (struct net_device *net, u32 level) | |||
854 | EXPORT_SYMBOL_GPL(usbnet_set_msglevel); | 854 | EXPORT_SYMBOL_GPL(usbnet_set_msglevel); |
855 | 855 | ||
856 | /* drivers may override default ethtool_ops in their bind() routine */ | 856 | /* drivers may override default ethtool_ops in their bind() routine */ |
857 | static struct ethtool_ops usbnet_ethtool_ops = { | 857 | static const struct ethtool_ops usbnet_ethtool_ops = { |
858 | .get_settings = usbnet_get_settings, | 858 | .get_settings = usbnet_get_settings, |
859 | .set_settings = usbnet_set_settings, | 859 | .set_settings = usbnet_set_settings, |
860 | .get_link = usbnet_get_link, | 860 | .get_link = usbnet_get_link, |
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index d1941cdff62b..ade5b344f75d 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -129,7 +129,7 @@ static int veth_set_tx_csum(struct net_device *dev, u32 data) | |||
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static struct ethtool_ops veth_ethtool_ops = { | 132 | static const struct ethtool_ops veth_ethtool_ops = { |
133 | .get_settings = veth_get_settings, | 133 | .get_settings = veth_get_settings, |
134 | .get_drvinfo = veth_get_drvinfo, | 134 | .get_drvinfo = veth_get_drvinfo, |
135 | .get_link = ethtool_op_get_link, | 135 | .get_link = ethtool_op_get_link, |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 51e9ce4907f0..32266fb89c20 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -798,7 +798,7 @@ static void virtnet_vlan_rx_kill_vid(struct net_device *dev, u16 vid) | |||
798 | dev_warn(&dev->dev, "Failed to kill VLAN ID %d.\n", vid); | 798 | dev_warn(&dev->dev, "Failed to kill VLAN ID %d.\n", vid); |
799 | } | 799 | } |
800 | 800 | ||
801 | static struct ethtool_ops virtnet_ethtool_ops = { | 801 | static const struct ethtool_ops virtnet_ethtool_ops = { |
802 | .set_tx_csum = virtnet_set_tx_csum, | 802 | .set_tx_csum = virtnet_set_tx_csum, |
803 | .set_sg = ethtool_op_set_sg, | 803 | .set_sg = ethtool_op_set_sg, |
804 | .set_tso = ethtool_op_set_tso, | 804 | .set_tso = ethtool_op_set_tso, |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 578c69783589..d3b69a4b4b5e 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include "defs.h" | 14 | #include "defs.h" |
15 | #include "hostcmd.h" | 15 | #include "hostcmd.h" |
16 | 16 | ||
17 | extern struct ethtool_ops lbs_ethtool_ops; | 17 | extern const struct ethtool_ops lbs_ethtool_ops; |
18 | 18 | ||
19 | #define MAX_BSSID_PER_CHANNEL 16 | 19 | #define MAX_BSSID_PER_CHANNEL 16 |
20 | 20 | ||
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c index b118a35ec605..039b555e4d76 100644 --- a/drivers/net/wireless/libertas/ethtool.c +++ b/drivers/net/wireless/libertas/ethtool.c | |||
@@ -183,7 +183,7 @@ static int lbs_ethtool_set_wol(struct net_device *dev, | |||
183 | return lbs_host_sleep_cfg(priv, criteria, (struct wol_config *)NULL); | 183 | return lbs_host_sleep_cfg(priv, criteria, (struct wol_config *)NULL); |
184 | } | 184 | } |
185 | 185 | ||
186 | struct ethtool_ops lbs_ethtool_ops = { | 186 | const struct ethtool_ops lbs_ethtool_ops = { |
187 | .get_drvinfo = lbs_ethtool_get_drvinfo, | 187 | .get_drvinfo = lbs_ethtool_get_drvinfo, |
188 | .get_eeprom = lbs_ethtool_get_eeprom, | 188 | .get_eeprom = lbs_ethtool_get_eeprom, |
189 | .get_eeprom_len = lbs_ethtool_get_eeprom_len, | 189 | .get_eeprom_len = lbs_ethtool_get_eeprom_len, |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 3700c49d76ca..baa051d5bfbe 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include <xen/interface/memory.h> | 51 | #include <xen/interface/memory.h> |
52 | #include <xen/interface/grant_table.h> | 52 | #include <xen/interface/grant_table.h> |
53 | 53 | ||
54 | static struct ethtool_ops xennet_ethtool_ops; | 54 | static const struct ethtool_ops xennet_ethtool_ops; |
55 | 55 | ||
56 | struct netfront_cb { | 56 | struct netfront_cb { |
57 | struct page *page; | 57 | struct page *page; |
@@ -1627,7 +1627,7 @@ static void backend_changed(struct xenbus_device *dev, | |||
1627 | } | 1627 | } |
1628 | } | 1628 | } |
1629 | 1629 | ||
1630 | static struct ethtool_ops xennet_ethtool_ops = | 1630 | static const struct ethtool_ops xennet_ethtool_ops = |
1631 | { | 1631 | { |
1632 | .set_tx_csum = ethtool_op_set_tx_csum, | 1632 | .set_tx_csum = ethtool_op_set_tx_csum, |
1633 | .set_sg = xennet_set_sg, | 1633 | .set_sg = xennet_set_sg, |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 12ee7a35ca59..94b161121c26 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -863,7 +863,7 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev) | |||
863 | return; | 863 | return; |
864 | } | 864 | } |
865 | 865 | ||
866 | static struct ethtool_ops qeth_l2_ethtool_ops = { | 866 | static const struct ethtool_ops qeth_l2_ethtool_ops = { |
867 | .get_link = ethtool_op_get_link, | 867 | .get_link = ethtool_op_get_link, |
868 | .get_strings = qeth_core_get_strings, | 868 | .get_strings = qeth_core_get_strings, |
869 | .get_ethtool_stats = qeth_core_get_ethtool_stats, | 869 | .get_ethtool_stats = qeth_core_get_ethtool_stats, |
@@ -872,7 +872,7 @@ static struct ethtool_ops qeth_l2_ethtool_ops = { | |||
872 | .get_settings = qeth_core_ethtool_get_settings, | 872 | .get_settings = qeth_core_ethtool_get_settings, |
873 | }; | 873 | }; |
874 | 874 | ||
875 | static struct ethtool_ops qeth_l2_osn_ops = { | 875 | static const struct ethtool_ops qeth_l2_osn_ops = { |
876 | .get_strings = qeth_core_get_strings, | 876 | .get_strings = qeth_core_get_strings, |
877 | .get_ethtool_stats = qeth_core_get_ethtool_stats, | 877 | .get_ethtool_stats = qeth_core_get_ethtool_stats, |
878 | .get_stats_count = qeth_core_get_stats_count, | 878 | .get_stats_count = qeth_core_get_stats_count, |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index d9fabe30c0da..115b4a0dae6e 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2946,7 +2946,7 @@ static int qeth_l3_ethtool_set_tso(struct net_device *dev, u32 data) | |||
2946 | return 0; | 2946 | return 0; |
2947 | } | 2947 | } |
2948 | 2948 | ||
2949 | static struct ethtool_ops qeth_l3_ethtool_ops = { | 2949 | static const struct ethtool_ops qeth_l3_ethtool_ops = { |
2950 | .get_link = ethtool_op_get_link, | 2950 | .get_link = ethtool_op_get_link, |
2951 | .get_tx_csum = ethtool_op_get_tx_csum, | 2951 | .get_tx_csum = ethtool_op_get_tx_csum, |
2952 | .set_tx_csum = ethtool_op_set_tx_hw_csum, | 2952 | .set_tx_csum = ethtool_op_set_tx_hw_csum, |
diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c index 7b8aa5edf42f..c165c50c0119 100644 --- a/drivers/staging/at76_usb/at76_usb.c +++ b/drivers/staging/at76_usb/at76_usb.c | |||
@@ -3396,7 +3396,7 @@ static u32 at76_ethtool_get_link(struct net_device *netdev) | |||
3396 | return priv->mac_state == MAC_CONNECTED; | 3396 | return priv->mac_state == MAC_CONNECTED; |
3397 | } | 3397 | } |
3398 | 3398 | ||
3399 | static struct ethtool_ops at76_ethtool_ops = { | 3399 | static const struct ethtool_ops at76_ethtool_ops = { |
3400 | .get_drvinfo = at76_ethtool_get_drvinfo, | 3400 | .get_drvinfo = at76_ethtool_get_drvinfo, |
3401 | .get_link = at76_ethtool_get_link, | 3401 | .get_link = at76_ethtool_get_link, |
3402 | }; | 3402 | }; |
diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c index 93cab0a48925..42230e62a222 100644 --- a/drivers/staging/octeon/ethernet-mdio.c +++ b/drivers/staging/octeon/ethernet-mdio.c | |||
@@ -170,7 +170,7 @@ static u32 cvm_oct_get_link(struct net_device *dev) | |||
170 | return ret; | 170 | return ret; |
171 | } | 171 | } |
172 | 172 | ||
173 | struct ethtool_ops cvm_oct_ethtool_ops = { | 173 | struct const ethtool_ops cvm_oct_ethtool_ops = { |
174 | .get_drvinfo = cvm_oct_get_drvinfo, | 174 | .get_drvinfo = cvm_oct_get_drvinfo, |
175 | .get_settings = cvm_oct_get_settings, | 175 | .get_settings = cvm_oct_get_settings, |
176 | .set_settings = cvm_oct_set_settings, | 176 | .set_settings = cvm_oct_set_settings, |
diff --git a/drivers/staging/octeon/ethernet-mdio.h b/drivers/staging/octeon/ethernet-mdio.h index 6314141e5ef2..b3328aeec2df 100644 --- a/drivers/staging/octeon/ethernet-mdio.h +++ b/drivers/staging/octeon/ethernet-mdio.h | |||
@@ -41,6 +41,6 @@ | |||
41 | #include <net/xfrm.h> | 41 | #include <net/xfrm.h> |
42 | #endif /* CONFIG_XFRM */ | 42 | #endif /* CONFIG_XFRM */ |
43 | 43 | ||
44 | extern struct ethtool_ops cvm_oct_ethtool_ops; | 44 | extern const struct ethtool_ops cvm_oct_ethtool_ops; |
45 | int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | 45 | int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
46 | int cvm_oct_mdio_setup_device(struct net_device *dev); | 46 | int cvm_oct_mdio_setup_device(struct net_device *dev); |
diff --git a/drivers/staging/sxg/sxg.h b/drivers/staging/sxg/sxg.h index f07aa708d862..110096a5c52f 100644 --- a/drivers/staging/sxg/sxg.h +++ b/drivers/staging/sxg/sxg.h | |||
@@ -782,6 +782,6 @@ struct slic_crash_info { | |||
782 | #define SIOCSLICSETINTAGG (SIOCDEVPRIVATE+10) | 782 | #define SIOCSLICSETINTAGG (SIOCDEVPRIVATE+10) |
783 | #define SIOCSLICTRACEDUMP (SIOCDEVPRIVATE+11) | 783 | #define SIOCSLICTRACEDUMP (SIOCDEVPRIVATE+11) |
784 | 784 | ||
785 | extern struct ethtool_ops sxg_nic_ethtool_ops; | 785 | extern const struct ethtool_ops sxg_nic_ethtool_ops; |
786 | #define SXG_COMPLETE_SLOW_SEND_LIMIT 128 | 786 | #define SXG_COMPLETE_SLOW_SEND_LIMIT 128 |
787 | #endif /* __SXG_DRIVER_H__ */ | 787 | #endif /* __SXG_DRIVER_H__ */ |
diff --git a/drivers/staging/sxg/sxg_ethtool.c b/drivers/staging/sxg/sxg_ethtool.c index ad89cb829b85..f5a0706478da 100644 --- a/drivers/staging/sxg/sxg_ethtool.c +++ b/drivers/staging/sxg/sxg_ethtool.c | |||
@@ -300,7 +300,7 @@ static int sxg_nic_get_eeprom(struct net_device *netdev, | |||
300 | return 0; | 300 | return 0; |
301 | } | 301 | } |
302 | 302 | ||
303 | struct ethtool_ops sxg_nic_ethtool_ops = { | 303 | const struct ethtool_ops sxg_nic_ethtool_ops = { |
304 | .get_settings = sxg_nic_get_settings, | 304 | .get_settings = sxg_nic_get_settings, |
305 | .set_settings = sxg_nic_set_settings, | 305 | .set_settings = sxg_nic_set_settings, |
306 | .get_drvinfo = sxg_nic_get_drvinfo, | 306 | .get_drvinfo = sxg_nic_get_drvinfo, |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index dc3ebd1e68ca..c66521953917 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -181,7 +181,7 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p) | |||
181 | * - ... probably more ethtool ops | 181 | * - ... probably more ethtool ops |
182 | */ | 182 | */ |
183 | 183 | ||
184 | static struct ethtool_ops ops = { | 184 | static const struct ethtool_ops ops = { |
185 | .get_drvinfo = eth_get_drvinfo, | 185 | .get_drvinfo = eth_get_drvinfo, |
186 | .get_link = ethtool_op_get_link, | 186 | .get_link = ethtool_op_get_link, |
187 | }; | 187 | }; |