]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: clean up PHY ID reading
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 18 Jun 2020 13:45:37 +0000 (14:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:17:14 +0000 (20:17 -0700)
commit8e930d3e93f79c892606a82ced15e7be38b7e382
tree88c9482f770a632bb7f3d6c609b8eb3e632fa2f6
parent3607b791ed3c101f58a530b3f8c9b90328c0d3a5
net: phy: clean up PHY ID reading

Rearrange the code to read the PHY IDs, so we don't call get_phy_id()
only to immediately call get_phy_c45_ids().  Move that logic into
get_phy_device(), which results in better readability.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c