Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b07be4b authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

net: make ethtool_ops const



Auditing all usage of ethtool_ops found several drivers that
are not declaring the struct const when it should be.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8b88efc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1963,7 +1963,7 @@ static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
	return -EOPNOTSUPP;
	return -EOPNOTSUPP;
}
}


static struct ethtool_ops cxgb_ethtool_ops = {
static const struct ethtool_ops cxgb_ethtool_ops = {
	.get_settings      = get_settings,
	.get_settings      = get_settings,
	.set_settings      = set_settings,
	.set_settings      = set_settings,
	.get_drvinfo       = get_drvinfo,
	.get_drvinfo       = get_drvinfo,
+1 −1
Original line number Original line Diff line number Diff line
@@ -1564,7 +1564,7 @@ static void cxgb4vf_get_wol(struct net_device *dev,
 */
 */
#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)
#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)


static struct ethtool_ops cxgb4vf_ethtool_ops = {
static const struct ethtool_ops cxgb4vf_ethtool_ops = {
	.get_settings		= cxgb4vf_get_settings,
	.get_settings		= cxgb4vf_get_settings,
	.get_drvinfo		= cxgb4vf_get_drvinfo,
	.get_drvinfo		= cxgb4vf_get_drvinfo,
	.get_msglevel		= cxgb4vf_get_msglevel,
	.get_msglevel		= cxgb4vf_get_msglevel,
+1 −1
Original line number Original line Diff line number Diff line
@@ -1152,7 +1152,7 @@ static void fec_enet_get_drvinfo(struct net_device *ndev,
	strcpy(info->bus_info, dev_name(&ndev->dev));
	strcpy(info->bus_info, dev_name(&ndev->dev));
}
}


static struct ethtool_ops fec_enet_ethtool_ops = {
static const struct ethtool_ops fec_enet_ethtool_ops = {
	.get_settings		= fec_enet_get_settings,
	.get_settings		= fec_enet_get_settings,
	.set_settings		= fec_enet_set_settings,
	.set_settings		= fec_enet_set_settings,
	.get_drvinfo		= fec_enet_get_drvinfo,
	.get_drvinfo		= fec_enet_get_drvinfo,
+1 −1
Original line number Original line Diff line number Diff line
@@ -6607,7 +6607,7 @@ static int netdev_set_features(struct net_device *dev,
	return 0;
	return 0;
}
}


static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
	.get_settings		= netdev_get_settings,
	.get_settings		= netdev_get_settings,
	.set_settings		= netdev_set_settings,
	.set_settings		= netdev_set_settings,
	.nway_reset		= netdev_nway_reset,
	.nway_reset		= netdev_nway_reset,
+3 −3
Original line number Original line Diff line number Diff line
@@ -1369,7 +1369,7 @@ static void sh_eth_get_strings(struct net_device *ndev, u32 stringset, u8 *data)
	}
	}
}
}


static struct ethtool_ops sh_eth_ethtool_ops = {
static const struct ethtool_ops sh_eth_ethtool_ops = {
	.get_settings	= sh_eth_get_settings,
	.get_settings	= sh_eth_get_settings,
	.set_settings	= sh_eth_set_settings,
	.set_settings	= sh_eth_set_settings,
	.nway_reset	= sh_eth_nway_reset,
	.nway_reset	= sh_eth_nway_reset,
Loading