From: Stephen Hemminger Date: Wed, 18 Jan 2012 22:13:32 +0000 (+0000) Subject: ixgbevf: make ethtool ops and strings const X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~71 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=56d0e41ce8f304afbc75fde5fba92905ec7605ca;p=users%2Fjedix%2Flinux-maple.git ixgbevf: make ethtool ops and strings const (cherry picked from commit b47aca135d6df5f676c768368baf3c099f054fcd) Signed-off-by: Stephen Hemminger Tested-by: Sibai Li Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbevf/ethtool.c b/drivers/net/ixgbevf/ethtool.c index 149fa520d7f2..d1c91c8202a5 100644 --- a/drivers/net/ixgbevf/ethtool.c +++ b/drivers/net/ixgbevf/ethtool.c @@ -56,7 +56,8 @@ struct ixgbe_stats { offsetof(struct ixgbevf_adapter, m), \ offsetof(struct ixgbevf_adapter, b), \ offsetof(struct ixgbevf_adapter, r) -static struct ixgbe_stats ixgbe_gstrings_stats[] = { + +static const struct ixgbe_stats ixgbe_gstrings_stats[] = { {"rx_packets", IXGBEVF_STAT(stats.vfgprc, stats.base_vfgprc, stats.saved_reset_vfgprc)}, {"tx_packets", IXGBEVF_STAT(stats.vfgptc, stats.base_vfgptc, @@ -671,7 +672,7 @@ static int ixgbevf_nway_reset(struct net_device *netdev) return 0; } -static struct ethtool_ops ixgbevf_ethtool_ops = { +static const struct ethtool_ops ixgbevf_ethtool_ops = { .get_settings = ixgbevf_get_settings, .get_drvinfo = ixgbevf_get_drvinfo, .get_regs_len = ixgbevf_get_regs_len,