mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
net: phy: fixed_phy: simplify fixed_mdio_read
swphy_read_reg() doesn't change the passed struct fixed_phy_status, so we can pass &fp->status directly. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/c49195c7-a3a1-485c-baed-9b33740752de@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a6bac18229
commit
6aff369990
|
|
@ -75,8 +75,6 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
|
|||
|
||||
list_for_each_entry(fp, &fmb->phys, node) {
|
||||
if (fp->addr == phy_addr) {
|
||||
struct fixed_phy_status state;
|
||||
|
||||
fp->status.link = !fp->no_carrier;
|
||||
|
||||
/* Issue callback if user registered it. */
|
||||
|
|
@ -86,9 +84,8 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
|
|||
|
||||
/* Check the GPIO for change in status */
|
||||
fixed_phy_update(fp);
|
||||
state = fp->status;
|
||||
|
||||
return swphy_read_reg(reg_num, &state);
|
||||
return swphy_read_reg(reg_num, &fp->status);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user