diff options
author | stephen hemminger <stephen@networkplumber.org> | 2016-08-31 18:57:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-01 00:17:30 +0300 |
commit | ce0b15d1103102b78ad95739fa71e62fb16774bd (patch) | |
tree | a799e9e9b1be57faa04d92ef340c808f120086da /drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | |
parent | 07469f8ceb55add2ef771aece078027eb20f88b6 (diff) | |
download | linux-ce0b15d1103102b78ad95739fa71e62fb16774bd.tar.xz |
xgbe: constify get_netdev_ops and get_ethtool_ops
Casting away const is bad practice. Since this is ARM specific driver
don't have hardware actually test this.
Having getter functions for ops is really unnecessary code bloat, but
not going to touch that.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c index 11d9f0c5b78b..4007b429c80c 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c @@ -623,7 +623,7 @@ static const struct ethtool_ops xgbe_ethtool_ops = { .get_ts_info = xgbe_get_ts_info, }; -struct ethtool_ops *xgbe_get_ethtool_ops(void) +const struct ethtool_ops *xgbe_get_ethtool_ops(void) { - return (struct ethtool_ops *)&xgbe_ethtool_ops; + return &xgbe_ethtool_ops; } |