net: phy: rename phy_do_ioctl to phy_do_ioctl_running
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 20 Jan 2020 21:16:07 +0000 (22:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jan 2020 09:50:41 +0000 (10:50 +0100)
We just added phy_do_ioctl, but it turned out that we need another
version of this function that doesn't check whether net_device is
running. So rename phy_do_ioctl to phy_do_ioctl_running.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c
drivers/net/phy/phy.c
include/linux/phy.h

index 175f951b6547f9234b6b70694c7bc29f5d2ae60a..7a5fe11378aab2ae8511325b815e2e1a0f243e73 100644 (file)
@@ -5158,7 +5158,7 @@ static const struct net_device_ops rtl_netdev_ops = {
        .ndo_fix_features       = rtl8169_fix_features,
        .ndo_set_features       = rtl8169_set_features,
        .ndo_set_mac_address    = rtl_set_mac_address,
-       .ndo_do_ioctl           = phy_do_ioctl,
+       .ndo_do_ioctl           = phy_do_ioctl_running,
        .ndo_set_rx_mode        = rtl_set_rx_mode,
 #ifdef CONFIG_NET_POLL_CONTROLLER
        .ndo_poll_controller    = rtl8169_netpoll,
index da05b3480abb291decec09a72a49946aa4864b73..cf25fa3be12388963997be82239727ddb6fbf9db 100644 (file)
@@ -433,19 +433,19 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
 EXPORT_SYMBOL(phy_mii_ioctl);
 
 /**
- * phy_do_ioctl - generic ndo_do_ioctl implementation
+ * phy_do_ioctl_running - generic ndo_do_ioctl implementation
  * @dev: the net_device struct
  * @ifr: &struct ifreq for socket ioctl's
  * @cmd: ioctl cmd to execute
  */
-int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
        if (!netif_running(dev) || !dev->phydev)
                return -ENODEV;
 
        return phy_mii_ioctl(dev->phydev, ifr, cmd);
 }
-EXPORT_SYMBOL(phy_do_ioctl);
+EXPORT_SYMBOL(phy_do_ioctl_running);
 
 void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies)
 {
index be6b3a1b03da8f16ff60cc46dbbc48438a6aee6c..f6e714da37d8125c9346076fb1ad951bbcde3a74 100644 (file)
@@ -1242,7 +1242,7 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev,
 int phy_ethtool_ksettings_set(struct phy_device *phydev,
                              const struct ethtool_link_ksettings *cmd);
 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
-int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
+int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd);
 void phy_request_interrupt(struct phy_device *phydev);
 void phy_free_interrupt(struct phy_device *phydev);
 void phy_print_status(struct phy_device *phydev);