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-18 12:12:02 +0100 |
commit | 2ff2fb70fd27db82dce8d60dbfc72eb68a349c22 (patch) | |
tree | c07ef33b1756ee4865a9249c34639ef59e99883e | |
parent | e567edddbd50f7eb9414b81f328e83d8b883bce2 (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) |