Message ID | 18b53769-e444-663d-650d-5887b3ae53ad@gmail.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | [net-next,1/2] net: phy: add helper phy_polling_mode | expand |
I think you can combine these two patches into one. Thank you.
On 22.07.2018 20:11, David Miller wrote: > > I think you can combine these two patches into one. > > Thank you. > Sure, will provide a v2.
diff --git a/include/linux/phy.h b/include/linux/phy.h index 075c2f77..cd6f637c 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -824,6 +824,16 @@ static inline bool phy_interrupt_is_valid(struct phy_device *phydev) return phydev->irq != PHY_POLL && phydev->irq != PHY_IGNORE_INTERRUPT; } +/** + * phy_polling_mode - Convenience function for testing whether polling is + * used to detect PHY status changes + * @phydev: the phy_device struct + */ +static inline bool phy_polling_mode(struct phy_device *phydev) +{ + return phydev->irq == PHY_POLL; +} + /** * phy_is_internal - Convenience function for testing if a PHY is internal * @phydev: the phy_device struct
Add a helper for checking whether polling is used to detect PHY status changes. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- include/linux/phy.h | 10 ++++++++++ 1 file changed, 10 insertions(+)