diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-06-18 11:42:25 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-06-21 10:57:37 +0100 |
commit | 579fafbbdcc64fcc2a5c599097dc596f46eb5158 (patch) | |
tree | acd8fffdfbd7385778518cb5e5f6a41f054b1e8a | |
parent | e1a7cc76e8cd8c3cb2c3684f27daeb26d065f720 (diff) |
net: pcs: xpcs: use mdiodev accessors
Use mdiodev accessors rather than accessing the bus and address in
the mdio_device structure and using the mdiobus accessors.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | drivers/net/pcs/pcs-xpcs.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 9535465e481c..3872f689cf22 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -176,19 +176,15 @@ static bool __xpcs_linkmode_supported(const struct xpcs_compat *compat, int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg) { u32 reg_addr = mdiobus_c45_addr(dev, reg); - struct mii_bus *bus = xpcs->mdiodev->bus; - int addr = xpcs->mdiodev->addr; - return mdiobus_read(bus, addr, reg_addr); + return mdiodev_read(xpcs->mdiodev, reg_addr); } int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val) { u32 reg_addr = mdiobus_c45_addr(dev, reg); - struct mii_bus *bus = xpcs->mdiodev->bus; - int addr = xpcs->mdiodev->addr; - return mdiobus_write(bus, addr, reg_addr, val); + return mdiodev_write(xpcs->mdiodev, reg_addr, val); } static int xpcs_read_vendor(struct dw_xpcs *xpcs, int dev, u32 reg) |