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>
This commit is contained in:
committed by
David S. Miller
parent
daf09de817
commit
0fc0b732ea
@ -731,7 +731,7 @@ static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
|
||||
/* We need to override some ethtool_ops so we require our
|
||||
own structure so we don't interfere with other usbnet
|
||||
devices that may be connected at the same time. */
|
||||
static struct ethtool_ops ax88172_ethtool_ops = {
|
||||
static const struct ethtool_ops ax88172_ethtool_ops = {
|
||||
.get_drvinfo = asix_get_drvinfo,
|
||||
.get_link = asix_get_link,
|
||||
.get_msglevel = usbnet_get_msglevel,
|
||||
@ -873,7 +873,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct ethtool_ops ax88772_ethtool_ops = {
|
||||
static const struct ethtool_ops ax88772_ethtool_ops = {
|
||||
.get_drvinfo = asix_get_drvinfo,
|
||||
.get_link = asix_get_link,
|
||||
.get_msglevel = usbnet_get_msglevel,
|
||||
|
@ -698,7 +698,7 @@ static int catc_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ethtool_ops ops = {
|
||||
static const struct ethtool_ops ops = {
|
||||
.get_drvinfo = catc_get_drvinfo,
|
||||
.get_settings = catc_get_settings,
|
||||
.get_link = ethtool_op_get_link
|
||||
|
@ -356,7 +356,7 @@ static int dm9601_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
|
||||
return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
|
||||
}
|
||||
|
||||
static struct ethtool_ops dm9601_ethtool_ops = {
|
||||
static const struct ethtool_ops dm9601_ethtool_ops = {
|
||||
.get_drvinfo = dm9601_get_drvinfo,
|
||||
.get_link = dm9601_get_link,
|
||||
.get_msglevel = usbnet_get_msglevel,
|
||||
|
@ -829,7 +829,7 @@ static void hso_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info
|
||||
usb_make_path(odev->parent->usb, info->bus_info, sizeof info->bus_info);
|
||||
}
|
||||
|
||||
static struct ethtool_ops ops = {
|
||||
static const struct ethtool_ops ops = {
|
||||
.get_drvinfo = hso_get_drvinfo,
|
||||
.get_link = ethtool_op_get_link
|
||||
};
|
||||
|
@ -778,7 +778,7 @@ static u32 kaweth_get_link(struct net_device *dev)
|
||||
return kaweth->linkstate;
|
||||
}
|
||||
|
||||
static struct ethtool_ops ops = {
|
||||
static const struct ethtool_ops ops = {
|
||||
.get_drvinfo = kaweth_get_drvinfo,
|
||||
.get_link = kaweth_get_link
|
||||
};
|
||||
|
@ -449,7 +449,7 @@ static void mcs7830_get_regs(struct net_device *net, struct ethtool_regs *regs,
|
||||
mcs7830_get_reg(dev, 0, regs->len, data);
|
||||
}
|
||||
|
||||
static struct ethtool_ops mcs7830_ethtool_ops = {
|
||||
static const struct ethtool_ops mcs7830_ethtool_ops = {
|
||||
.get_drvinfo = mcs7830_get_drvinfo,
|
||||
.get_regs_len = mcs7830_get_regs_len,
|
||||
.get_regs = mcs7830_get_regs,
|
||||
|
@ -1174,7 +1174,7 @@ static void pegasus_set_msglevel(struct net_device *dev, u32 v)
|
||||
pegasus->msg_enable = v;
|
||||
}
|
||||
|
||||
static struct ethtool_ops ops = {
|
||||
static const struct ethtool_ops ops = {
|
||||
.get_drvinfo = pegasus_get_drvinfo,
|
||||
.get_settings = pegasus_get_settings,
|
||||
.set_settings = pegasus_set_settings,
|
||||
|
@ -865,7 +865,7 @@ static int rtl8150_get_settings(struct net_device *netdev, struct ethtool_cmd *e
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ethtool_ops ops = {
|
||||
static const struct ethtool_ops ops = {
|
||||
.get_drvinfo = rtl8150_get_drvinfo,
|
||||
.get_settings = rtl8150_get_settings,
|
||||
.get_link = ethtool_op_get_link
|
||||
|
@ -625,7 +625,7 @@ static int smsc95xx_ethtool_set_tx_csum(struct net_device *netdev, u32 val)
|
||||
return smsc95xx_set_csums(dev);
|
||||
}
|
||||
|
||||
static struct ethtool_ops smsc95xx_ethtool_ops = {
|
||||
static const struct ethtool_ops smsc95xx_ethtool_ops = {
|
||||
.get_link = usbnet_get_link,
|
||||
.nway_reset = usbnet_nway_reset,
|
||||
.get_drvinfo = usbnet_get_drvinfo,
|
||||
|
@ -854,7 +854,7 @@ void usbnet_set_msglevel (struct net_device *net, u32 level)
|
||||
EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
|
||||
|
||||
/* drivers may override default ethtool_ops in their bind() routine */
|
||||
static struct ethtool_ops usbnet_ethtool_ops = {
|
||||
static const struct ethtool_ops usbnet_ethtool_ops = {
|
||||
.get_settings = usbnet_get_settings,
|
||||
.set_settings = usbnet_set_settings,
|
||||
.get_link = usbnet_get_link,
|
||||
|
Reference in New Issue
Block a user