net: convert suitable drivers to use phy_do_ioctl_running
Convert suitable drivers to use new helper phy_do_ioctl_running. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Timur Tabi <timur@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
954b3c4397
commit
fd786fb1d2
@@ -781,18 +781,6 @@ static int arc_emac_set_address(struct net_device *ndev, void *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int arc_emac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
{
|
||||
if (!netif_running(dev))
|
||||
return -EINVAL;
|
||||
|
||||
if (!dev->phydev)
|
||||
return -ENODEV;
|
||||
|
||||
return phy_mii_ioctl(dev->phydev, rq, cmd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* arc_emac_restart - Restart EMAC
|
||||
* @ndev: Pointer to net_device structure.
|
||||
@@ -857,7 +845,7 @@ static const struct net_device_ops arc_emac_netdev_ops = {
|
||||
.ndo_set_mac_address = arc_emac_set_address,
|
||||
.ndo_get_stats = arc_emac_stats,
|
||||
.ndo_set_rx_mode = arc_emac_set_rx_mode,
|
||||
.ndo_do_ioctl = arc_emac_ioctl,
|
||||
.ndo_do_ioctl = phy_do_ioctl_running,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = arc_emac_poll_controller,
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user