]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: move definition of phy_is_started before phy_disable_eee_mode
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 16 Feb 2025 21:15:42 +0000 (22:15 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 19 Feb 2025 02:07:08 +0000 (18:07 -0800)
In preparation of a follow-up patch, move phy_is_started() to before
phy_disable_eee_mode().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/04d1e7a5-f4c0-42ab-8fa4-88ad26b74813@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/phy.h

index 70c632799082e6c3a4ccb976cba0321f65e42f28..96ea56de71b287d931920f4f4d288d71fa5a47c1 100644 (file)
@@ -1340,22 +1340,22 @@ void of_set_phy_timing_role(struct phy_device *phydev);
 int phy_speed_down_core(struct phy_device *phydev);
 
 /**
- * phy_disable_eee_mode - Don't advertise an EEE mode.
+ * phy_is_started - Convenience function to check whether PHY is started
  * @phydev: The phy_device struct
- * @link_mode: The EEE mode to be disabled
  */
-static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode)
+static inline bool phy_is_started(struct phy_device *phydev)
 {
-       linkmode_set_bit(link_mode, phydev->eee_disabled_modes);
+       return phydev->state >= PHY_UP;
 }
 
 /**
- * phy_is_started - Convenience function to check whether PHY is started
+ * phy_disable_eee_mode - Don't advertise an EEE mode.
  * @phydev: The phy_device struct
+ * @link_mode: The EEE mode to be disabled
  */
-static inline bool phy_is_started(struct phy_device *phydev)
+static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode)
 {
-       return phydev->state >= PHY_UP;
+       linkmode_set_bit(link_mode, phydev->eee_disabled_modes);
 }
 
 void phy_resolve_aneg_pause(struct phy_device *phydev);