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)
commite63062616df323cee4266ed3f964e20e00092d9a
tree88c9482f770a632bb7f3d6c609b8eb3e632fa2f6
parent454a78d17845882aa552dc3ab86605910da9a96d
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