mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
net: fec: use new iterator mdiobus_for_each_phy
Use new iterator mdiobus_for_each_phy() to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Wei Fang <wei.fang@nxp.com> Link: https://patch.msgid.link/65eb9490-5666-4b4a-8d26-3fca738b1315@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
26888de97b
commit
0514010d55
|
|
@ -2548,7 +2548,6 @@ static int fec_enet_mii_init(struct platform_device *pdev)
|
|||
int err = -ENXIO;
|
||||
u32 mii_speed, holdtime;
|
||||
u32 bus_freq;
|
||||
int addr;
|
||||
|
||||
/*
|
||||
* The i.MX28 dual fec interfaces are not equal.
|
||||
|
|
@ -2663,11 +2662,8 @@ static int fec_enet_mii_init(struct platform_device *pdev)
|
|||
of_node_put(node);
|
||||
|
||||
/* find all the PHY devices on the bus and set mac_managed_pm to true */
|
||||
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
||||
phydev = mdiobus_get_phy(fep->mii_bus, addr);
|
||||
if (phydev)
|
||||
phydev->mac_managed_pm = true;
|
||||
}
|
||||
mdiobus_for_each_phy(fep->mii_bus, phydev)
|
||||
phydev->mac_managed_pm = true;
|
||||
|
||||
mii_cnt++;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user