net: convert suitable drivers to use phy_do_ioctl_running
[linux-2.6-block.git] / drivers / net / ethernet / arc / emac_main.c
index 6f2c867785fe4752b52404fb176fb26b7e81e50b..17bda4e8cc45a4c4f3b95bab4b4aabd8e6365bbc 100644 (file)
@@ -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