]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: improve phy_driver_is_genphy
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 14 Jun 2025 20:31:57 +0000 (22:31 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Jun 2025 01:15:16 +0000 (18:15 -0700)
commit59e74c92e67e2951d829f9b0d78c5dc1df7c4c88
tree0e640b71221605d2c6008b641edc2cd19ce60628
parent2796ff1e3dcae7a3568f8e428ec9d32a8ee2fb36
net: phy: improve phy_driver_is_genphy

Use new flag phydev->is_genphy_driven to simplify this function.
Note that this includes a minor functional change:
Now this function returns true if ANY of the genphy drivers
is bound to the PHY device.

We have only one user in DSA driver mt7530, and there the
functional change doesn't matter.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/c9ac3a7d-262a-425d-9153-97fe3ca6280a@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_device.c
include/linux/phy.h