net: phy: micrel: Try default PHY ofnode first
authorMarek Vasut <marex@denx.de>
Sat, 16 Jan 2021 23:16:16 +0000 (00:16 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 27 Jan 2021 15:47:54 +0000 (10:47 -0500)
commitb5f09df246a8a24a3b4acb669cbf95d2a063176b
tree69e5bf8f47272b2f365933033c79d75e1bd16502
parentc34a927566d553a799b4811456b49c88b6e5e30c
net: phy: micrel: Try default PHY ofnode first

The phydev structure has a PHY OF node pointer in it, use that OF node
first when looking up PHY OF node properties, since that is likely the
correct PHY OF node pointer. If the pointer is not valid, which is the
case e.g. on legacy DTs, fall back to parsing MAC ethernet-phy subnode.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
drivers/net/phy/micrel_ksz90x1.c