Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dsa: lan9303: consistent naming for PHY address parameter

Name it 'addr' instead of 'port' or 'phy'.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Link: https://patch.msgid.link/20240715123050.21202-1-ceggers@arri.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Christian Eggers and committed by
Jakub Kicinski
f96eb117 cd9b6f47

+6 -6
+4 -4
drivers/net/dsa/lan9303_mdio.c
··· 58 58 return 0; 59 59 } 60 60 61 - static int lan9303_mdio_phy_write(struct lan9303 *chip, int phy, int reg, 61 + static int lan9303_mdio_phy_write(struct lan9303 *chip, int addr, int reg, 62 62 u16 val) 63 63 { 64 64 struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev); 65 65 66 - return mdiobus_write_nested(sw_dev->device->bus, phy, reg, val); 66 + return mdiobus_write_nested(sw_dev->device->bus, addr, reg, val); 67 67 } 68 68 69 - static int lan9303_mdio_phy_read(struct lan9303 *chip, int phy, int reg) 69 + static int lan9303_mdio_phy_read(struct lan9303 *chip, int addr, int reg) 70 70 { 71 71 struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev); 72 72 73 - return mdiobus_read_nested(sw_dev->device->bus, phy, reg); 73 + return mdiobus_read_nested(sw_dev->device->bus, addr, reg); 74 74 } 75 75 76 76 static const struct lan9303_phy_ops lan9303_mdio_phy_ops = {
+2 -2
include/linux/dsa/lan9303.h
··· 5 5 6 6 struct lan9303_phy_ops { 7 7 /* PHY 1 and 2 access*/ 8 - int (*phy_read)(struct lan9303 *chip, int port, int regnum); 9 - int (*phy_write)(struct lan9303 *chip, int port, 8 + int (*phy_read)(struct lan9303 *chip, int addr, int regnum); 9 + int (*phy_write)(struct lan9303 *chip, int addr, 10 10 int regnum, u16 val); 11 11 }; 12 12