diff options
Diffstat (limited to 'drivers/net/phy/marvell.c')
-rw-r--r-- | drivers/net/phy/marvell.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 73d6453b36..c0b819b109 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * drivers/net/phy/marvell.c * @@ -168,12 +169,6 @@ static int marvell_read_status(struct phy_device *phydev) #define MII_88E1510_GEN_CTRL_REG_1 0x14 -static inline bool phy_interface_is_rgmii(struct phy_device *phydev) -{ - return phydev->interface >= PHY_INTERFACE_MODE_RGMII && - phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID; -}; - /* * Set and/or override some configuration registers based on the * marvell,reg-init property stored in the of_node for the phydev. @@ -193,10 +188,10 @@ static int marvell_of_reg_init(struct phy_device *phydev) const __be32 *paddr; int len, i, saved_page, current_page, page_changed, ret; - if (!phydev->dev.device_node) + if (!phydev->dev.of_node) return 0; - paddr = of_get_property(phydev->dev.device_node, + paddr = of_get_property(phydev->dev.of_node, "marvell,reg-init", &len); if (!paddr || len < (4 * sizeof(*paddr))) return 0; @@ -739,9 +734,4 @@ static struct phy_driver marvell_drivers[] = { }, }; -static int __init marvell_phy_init(void) -{ - return phy_drivers_register(marvell_drivers, - ARRAY_SIZE(marvell_drivers)); -} -fs_initcall(marvell_phy_init); +device_phy_drivers(marvell_drivers); |