Skip to content

Commit f96eb11

Browse files
ceggers-arrikuba-moo
authored andcommitted
dsa: lan9303: consistent naming for PHY address parameter
Name it 'addr' instead of 'port' or 'phy'. Signed-off-by: Christian Eggers <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent cd9b6f4 commit f96eb11

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/net/dsa/lan9303_mdio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ static int lan9303_mdio_read(void *ctx, uint32_t reg, uint32_t *val)
5858
return 0;
5959
}
6060

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,
6262
u16 val)
6363
{
6464
struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
6565

66-
return mdiobus_write_nested(sw_dev->device->bus, phy, reg, val);
66+
return mdiobus_write_nested(sw_dev->device->bus, addr, reg, val);
6767
}
6868

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)
7070
{
7171
struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
7272

73-
return mdiobus_read_nested(sw_dev->device->bus, phy, reg);
73+
return mdiobus_read_nested(sw_dev->device->bus, addr, reg);
7474
}
7575

7676
static const struct lan9303_phy_ops lan9303_mdio_phy_ops = {

include/linux/dsa/lan9303.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ struct lan9303;
55

66
struct lan9303_phy_ops {
77
/* 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,
1010
int regnum, u16 val);
1111
};
1212

0 commit comments

Comments
 (0)