From 941ea69e176bc5cc8a359c6b608250fc950be0b1 Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Sat, 18 Jun 2016 16:37:20 +0200 Subject: net: ethernet: altera_tse: 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 phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller --- drivers/net/ethernet/altera/altera_tse_ethtool.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/net/ethernet/altera/altera_tse_ethtool.c') diff --git a/drivers/net/ethernet/altera/altera_tse_ethtool.c b/drivers/net/ethernet/altera/altera_tse_ethtool.c index be72e1e64525..c1b56080a3d1 100644 --- a/drivers/net/ethernet/altera/altera_tse_ethtool.c +++ b/drivers/net/ethernet/altera/altera_tse_ethtool.c @@ -235,8 +235,7 @@ static void tse_get_regs(struct net_device *dev, struct ethtool_regs *regs, static int tse_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct altera_tse_private *priv = netdev_priv(dev); - struct phy_device *phydev = priv->phydev; + struct phy_device *phydev = dev->phydev; if (phydev == NULL) return -ENODEV; @@ -246,8 +245,7 @@ static int tse_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) static int tse_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct altera_tse_private *priv = netdev_priv(dev); - struct phy_device *phydev = priv->phydev; + struct phy_device *phydev = dev->phydev; if (phydev == NULL) return -ENODEV; -- cgit v1.2.3-59-g8ed1b