Message ID | 20230331005518.2134652-17-andrew@lunn.ch (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: ethernet: Rework EEE | expand |
On 3/30/23 17:55, Andrew Lunn wrote: > Rather than calling phy_init_eee() retrieve the same information from > within the phydev structure. > > Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 3464ce5e7470..5984733e4d0d 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2218,10 +2218,7 @@ EXPORT_SYMBOL(b53_eee_enable_set); */ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy) { - int ret; - - ret = phy_init_eee(phy, false); - if (ret) + if (!phy->eee_active) return 0; b53_eee_enable_set(ds, port, true);
Rather than calling phy_init_eee() retrieve the same information from within the phydev structure. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- drivers/net/dsa/b53/b53_common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)