File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
178171static const struct dev_pm_ops mdio_bus_phy_pm_ops = {
179172 .suspend = mdio_bus_phy_suspend ,
Original file line number Diff line number Diff line change @@ -815,7 +815,6 @@ static inline void phy_device_free(struct phy_device *phydev) { }
815815#endif /* CONFIG_PHYLIB */
816816void phy_device_remove (struct phy_device * phydev );
817817int phy_init_hw (struct phy_device * phydev );
818- int phy_restore (struct phy_device * phydev );
819818int phy_suspend (struct phy_device * phydev );
820819int phy_resume (struct phy_device * phydev );
821820int phy_loopback (struct phy_device * phydev , bool enable );
You can’t perform that action at this time.
0 commit comments