Commit efdf7511 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by David S. Miller

ravb: remove useless serialization in ravb_get_link_ksettings()

phy_ethtool_ksettings_get() call does not modify device state or device
driver state, hence there is no need to utilize a driver specific
spinlock.
Signed-off-by: default avatarVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Reviewed-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eeb07284
...@@ -1109,15 +1109,10 @@ static int ravb_phy_start(struct net_device *ndev) ...@@ -1109,15 +1109,10 @@ static int ravb_phy_start(struct net_device *ndev)
static int ravb_get_link_ksettings(struct net_device *ndev, static int ravb_get_link_ksettings(struct net_device *ndev,
struct ethtool_link_ksettings *cmd) struct ethtool_link_ksettings *cmd)
{ {
struct ravb_private *priv = netdev_priv(ndev);
unsigned long flags;
if (!ndev->phydev) if (!ndev->phydev)
return -ENODEV; return -ENODEV;
spin_lock_irqsave(&priv->lock, flags);
phy_ethtool_ksettings_get(ndev->phydev, cmd); phy_ethtool_ksettings_get(ndev->phydev, cmd);
spin_unlock_irqrestore(&priv->lock, flags);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment