[PATCH net-next v2 0/2] net: phy: Use is_phy_driver() and is_phy_device()
Yajun Deng
yajun.deng at linux.dev
Tue Jan 2 18:53:32 PST 2024
There is only one flag that can be set in struct mdio_driver_common and
mdio_device. We can compare the probe of the driver or the type of the
device to implement it. Hence, these flags in struct mdio_driver_common
and mdio_device can be removed.
Introduce is_phy_driver() and is_phy_device(). Use them test the driver
or device.
v1 -> v2:
remove redundant parens and the exported.
Yajun Deng (2):
net: phy: Cleanup struct mdio_driver_common and introduce
is_phy_driver()
net: phy: Introduce is_phy_device()
drivers/net/dsa/b53/b53_mdio.c | 2 +-
drivers/net/dsa/dsa_loop.c | 2 +-
drivers/net/dsa/lan9303_mdio.c | 2 +-
drivers/net/dsa/microchip/ksz8863_smi.c | 2 +-
drivers/net/dsa/mt7530-mdio.c | 2 +-
drivers/net/dsa/mv88e6060.c | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
drivers/net/dsa/qca/ar9331.c | 2 +-
drivers/net/dsa/qca/qca8k-8xxx.c | 2 +-
drivers/net/dsa/realtek/realtek-mdio.c | 2 +-
drivers/net/dsa/xrs700x/xrs700x_mdio.c | 2 +-
drivers/net/phy/mdio_bus.c | 7 ++--
drivers/net/phy/mdio_device.c | 21 +++++-------
drivers/net/phy/phy_device.c | 44 ++++++++++++++-----------
drivers/net/phy/xilinx_gmii2rgmii.c | 2 +-
drivers/phy/broadcom/phy-bcm-ns-usb3.c | 8 ++---
drivers/phy/broadcom/phy-bcm-ns2-pcie.c | 8 ++---
include/linux/mdio.h | 19 ++---------
include/linux/phy.h | 10 +++---
19 files changed, 62 insertions(+), 79 deletions(-)
--
2.25.1
More information about the linux-phy
mailing list