diff options
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 177a330d84e5..bf1070c2a53b 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -676,26 +676,13 @@ size_t phy_speeds(unsigned int *speeds, size_t size, | |||
676 | void of_set_phy_supported(struct phy_device *phydev); | 676 | void of_set_phy_supported(struct phy_device *phydev); |
677 | void of_set_phy_eee_broken(struct phy_device *phydev); | 677 | void of_set_phy_eee_broken(struct phy_device *phydev); |
678 | 678 | ||
679 | static inline bool __phy_is_started(struct phy_device *phydev) | ||
680 | { | ||
681 | WARN_ON(!mutex_is_locked(&phydev->lock)); | ||
682 | |||
683 | return phydev->state >= PHY_UP; | ||
684 | } | ||
685 | |||
686 | /** | 679 | /** |
687 | * phy_is_started - Convenience function to check whether PHY is started | 680 | * phy_is_started - Convenience function to check whether PHY is started |
688 | * @phydev: The phy_device struct | 681 | * @phydev: The phy_device struct |
689 | */ | 682 | */ |
690 | static inline bool phy_is_started(struct phy_device *phydev) | 683 | static inline bool phy_is_started(struct phy_device *phydev) |
691 | { | 684 | { |
692 | bool started; | 685 | return phydev->state >= PHY_UP; |
693 | |||
694 | mutex_lock(&phydev->lock); | ||
695 | started = __phy_is_started(phydev); | ||
696 | mutex_unlock(&phydev->lock); | ||
697 | |||
698 | return started; | ||
699 | } | 686 | } |
700 | 687 | ||
701 | void phy_resolve_aneg_linkmode(struct phy_device *phydev); | 688 | void phy_resolve_aneg_linkmode(struct phy_device *phydev); |