Skip to content

Commit 94c33da

Browse files
committed
Revert "net: phy: Add a phy_restore() helper"
This reverts commit 6f90170.
1 parent f546b00 commit 94c33da

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

drivers/net/phy/phy_device.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,15 @@ static int mdio_bus_phy_resume(struct device *dev)
146146
return 0;
147147
}
148148

149-
int phy_restore(struct phy_device *phydev)
149+
static int mdio_bus_phy_restore(struct device *dev)
150150
{
151+
struct phy_device *phydev = to_phy_device(dev);
152+
struct net_device *netdev = phydev->attached_dev;
151153
int ret;
152154

155+
if (!netdev)
156+
return 0;
157+
153158
ret = phy_init_hw(phydev);
154159
if (ret < 0)
155160
return ret;
@@ -162,18 +167,6 @@ int phy_restore(struct phy_device *phydev)
162167

163168
return 0;
164169
}
165-
EXPORT_SYMBOL(phy_restore);
166-
167-
static int mdio_bus_phy_restore(struct device *dev)
168-
{
169-
struct phy_device *phydev = to_phy_device(dev);
170-
struct net_device *netdev = phydev->attached_dev;
171-
172-
if (!netdev)
173-
return 0;
174-
175-
return phy_restore(phydev);
176-
}
177170

178171
static const struct dev_pm_ops mdio_bus_phy_pm_ops = {
179172
.suspend = mdio_bus_phy_suspend,

include/linux/phy.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,6 @@ static inline void phy_device_free(struct phy_device *phydev) { }
815815
#endif /* CONFIG_PHYLIB */
816816
void phy_device_remove(struct phy_device *phydev);
817817
int phy_init_hw(struct phy_device *phydev);
818-
int phy_restore(struct phy_device *phydev);
819818
int phy_suspend(struct phy_device *phydev);
820819
int phy_resume(struct phy_device *phydev);
821820
int phy_loopback(struct phy_device *phydev, bool enable);

0 commit comments

Comments
 (0)