Skip to contentSkip to conversation

net: phy: of_phy_register_fixed_link(): drop redundant initialization

PATCH Applied Antony Pavlov 2 participants 2 messages Aug 18, 2016 – Aug 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: of_phy_register_fixed_link(): drop redundant initialization

The phy_device_create() function makes all necessary phydev initialization so we can drop phydev->pause and phydev->link initialization in the of_phy_register_fixed_link() function.

---
 drivers/net/phy/phy.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/phy/phy.c +0 -2
index 13b8324..7132516 100644
@@ -311,8 +311,6 @@ static struct phy_device *of_phy_register_fixed_link(struct device_node *np,
 	phydev->registered = 1;
 	phydev->speed = 1000;
 	phydev->duplex = 1;
-	phydev->pause = phydev->asym_pause = 0;
-	phydev->link = 1;
 
 	return phydev;
 }
Signature · 7 lines
2.8.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 8 lines · Antony Pavlov

The phy_device_create() function makes all necessary phydev initialization so we can drop phydev->pause and phydev->link initialization in the of_phy_register_fixed_link() function.

---
 drivers/net/phy/phy.c | 2 --
 1 file changed, 2 deletions(-)

Applied, thanks

Sascha

Quoted 18 lines
drivers/net/phy/phy.c +0 -2
index 13b8324..7132516 100644
@@ -311,8 +311,6 @@ static struct phy_device *of_phy_register_fixed_link(struct device_node *np,
 	phydev->registered = 1;
 	phydev->speed = 1000;
 	phydev->duplex = 1;
-	phydev->pause = phydev->asym_pause = 0;
-	phydev->link = 1;
 
 	return phydev;
 }
Signature · 1 line
2.8.1
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox