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 ef20aeea10cc..127fcc9c3778 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -674,26 +674,13 @@ phy_lookup_setting(int speed, int duplex, const unsigned long *mask, | |||
674 | size_t phy_speeds(unsigned int *speeds, size_t size, | 674 | size_t phy_speeds(unsigned int *speeds, size_t size, |
675 | unsigned long *mask); | 675 | unsigned long *mask); |
676 | 676 | ||
677 | static inline bool __phy_is_started(struct phy_device *phydev) | ||
678 | { | ||
679 | WARN_ON(!mutex_is_locked(&phydev->lock)); | ||
680 | |||
681 | return phydev->state >= PHY_UP; | ||
682 | } | ||
683 | |||
684 | /** | 677 | /** |
685 | * phy_is_started - Convenience function to check whether PHY is started | 678 | * phy_is_started - Convenience function to check whether PHY is started |
686 | * @phydev: The phy_device struct | 679 | * @phydev: The phy_device struct |
687 | */ | 680 | */ |
688 | static inline bool phy_is_started(struct phy_device *phydev) | 681 | static inline bool phy_is_started(struct phy_device *phydev) |
689 | { | 682 | { |
690 | bool started; | 683 | return phydev->state >= PHY_UP; |
691 | |||
692 | mutex_lock(&phydev->lock); | ||
693 | started = __phy_is_started(phydev); | ||
694 | mutex_unlock(&phydev->lock); | ||
695 | |||
696 | return started; | ||
697 | } | 684 | } |
698 | 685 | ||
699 | void phy_resolve_aneg_linkmode(struct phy_device *phydev); | 686 | void phy_resolve_aneg_linkmode(struct phy_device *phydev); |