return 0;
 }
 
-static bool at803x_match_phy_id(struct phy_device *phydev, u32 phy_id)
-{
-       return (phydev->phy_id & phydev->drv->phy_id_mask)
-               == (phy_id & phydev->drv->phy_id_mask);
-}
-
 static int at803x_parse_dt(struct phy_device *phydev)
 {
        struct device_node *node = phydev->mdio.dev.of_node;
                 *   to the AR8030 so there might be a good chance it works on
                 *   the AR8030 too.
                 */
-               if (at803x_match_phy_id(phydev, ATH8030_PHY_ID) ||
-                   at803x_match_phy_id(phydev, ATH8035_PHY_ID)) {
+               if (phydev->drv->phy_id == ATH8030_PHY_ID ||
+                   phydev->drv->phy_id == ATH8035_PHY_ID) {
                        priv->clk_25m_reg &= AT8035_CLK_OUT_MASK;
                        priv->clk_25m_mask &= AT8035_CLK_OUT_MASK;
                }
        /* Only supported on AR8031/AR8033, the AR8030/AR8035 use strapping
         * options.
         */
-       if (at803x_match_phy_id(phydev, ATH8031_PHY_ID)) {
+       if (phydev->drv->phy_id == ATH8031_PHY_ID) {
                if (of_property_read_bool(node, "qca,keep-pll-enabled"))
                        priv->flags |= AT803X_KEEP_PLL_ENABLED;
 
         * Switch to the copper page, as otherwise we read
         * the PHY capabilities from the fiber side.
         */
-       if (at803x_match_phy_id(phydev, ATH8031_PHY_ID)) {
+       if (phydev->drv->phy_id == ATH8031_PHY_ID) {
                phy_lock_mdio_bus(phydev);
                ret = at803x_write_page(phydev, AT803X_PAGE_COPPER);
                phy_unlock_mdio_bus(phydev);
        if (ret < 0)
                return ret;
 
-       if (at803x_match_phy_id(phydev, ATH8031_PHY_ID)) {
+       if (phydev->drv->phy_id == ATH8031_PHY_ID) {
                ret = at8031_pll_config(phydev);
                if (ret < 0)
                        return ret;