summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c
diff options
context:
space:
mode:
authorPhilippe Reynes <tremyfr@gmail.com>2016-07-15 00:44:52 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-16 02:41:34 +0300
commit80721e7fa68f914a21b2685a01399b3aa80ac116 (patch)
tree3af84b8e71392ecff15d71e33f486cc75ee8bd59 /drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c
parent6e3848404d418f4200790c3bdbab05e58de7976b (diff)
downloadlinux-80721e7fa68f914a21b2685a01399b3aa80ac116.tar.xz
net: ethernet: pasemi_mac: use phydev from struct net_device
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c')
-rw-r--r--drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c b/drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c
index f046bfc18e7d..e99cf4271733 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c
@@ -66,8 +66,7 @@ static int
pasemi_mac_ethtool_get_settings(struct net_device *netdev,
struct ethtool_cmd *cmd)
{
- struct pasemi_mac *mac = netdev_priv(netdev);
- struct phy_device *phydev = mac->phydev;
+ struct phy_device *phydev = netdev->phydev;
if (!phydev)
return -EOPNOTSUPP;
@@ -79,8 +78,7 @@ static int
pasemi_mac_ethtool_set_settings(struct net_device *netdev,
struct ethtool_cmd *cmd)
{
- struct pasemi_mac *mac = netdev_priv(netdev);
- struct phy_device *phydev = mac->phydev;
+ struct phy_device *phydev = netdev->phydev;
if (!phydev)
return -EOPNOTSUPP;