From 8a6a77bb5a41d5a91c6155e1b902d9f75b5bf9a6 Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Sun, 16 Feb 2025 22:15:42 +0100 Subject: [PATCH] net: phy: move definition of phy_is_started before phy_disable_eee_mode In preparation of a follow-up patch, move phy_is_started() to before phy_disable_eee_mode(). Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Link: https://patch.msgid.link/04d1e7a5-f4c0-42ab-8fa4-88ad26b74813@gmail.com Signed-off-by: Jakub Kicinski --- include/linux/phy.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/phy.h b/include/linux/phy.h index 70c632799082..96ea56de71b2 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1339,6 +1339,15 @@ void of_set_phy_eee_broken(struct phy_device *phydev); void of_set_phy_timing_role(struct phy_device *phydev); int phy_speed_down_core(struct phy_device *phydev); +/** + * phy_is_started - Convenience function to check whether PHY is started + * @phydev: The phy_device struct + */ +static inline bool phy_is_started(struct phy_device *phydev) +{ + return phydev->state >= PHY_UP; +} + /** * phy_disable_eee_mode - Don't advertise an EEE mode. * @phydev: The phy_device struct @@ -1349,15 +1358,6 @@ static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode linkmode_set_bit(link_mode, phydev->eee_disabled_modes); } -/** - * phy_is_started - Convenience function to check whether PHY is started - * @phydev: The phy_device struct - */ -static inline bool phy_is_started(struct phy_device *phydev) -{ - return phydev->state >= PHY_UP; -} - void phy_resolve_aneg_pause(struct phy_device *phydev); void phy_resolve_aneg_linkmode(struct phy_device *phydev); void phy_check_downshift(struct phy_device *phydev);