]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: marvell: consolidate phy status reading
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 17 Dec 2019 13:39:36 +0000 (13:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Dec 2019 20:52:34 +0000 (12:52 -0800)
commitff60a1d7e33c702ed1aefa448d8aa8c48698bd29
treeacd52e665ac63ab483a98f6b70f2d5f8f4ba4fb5
parentaa8c73f531a0647171e4dd3723e411bdaa765d22
net: phy: marvell: consolidate phy status reading

marvell_read_status_page_an() always reads the PHY status register, but
marvell_update_link() has already done this.  Rather than wastefully
reading the register twice in quick succession, read it once in
marvell_read_status_page() and use the result for both.

This makes marvell_update_link() rather pointless, so move it into
marvell_read_status_page().

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c