Add deprecation warnings and point to the new APIs user should use
instead.

Signed-off-by: Marco Felsch <m.fel...@pengutronix.de>
---
v2:
- new patch

 drivers/net/phy/phy.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4cabb436e461..ad02732ff93b 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -850,6 +850,9 @@ int phy_read_mmd_indirect(struct phy_device *phydev, int 
prtad, int devad)
 {
        u32 ret;
 
+       phydev_warn(phydev, "%s is deprectated use phy_read_mmd instead\n",
+                   __func__);
+
        mmd_phy_indirect(phydev, devad, prtad);
 
        /* Read the content of the MMD's selected register */
@@ -876,6 +879,9 @@ int phy_read_mmd_indirect(struct phy_device *phydev, int 
prtad, int devad)
 void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
                                   u16 data)
 {
+       phydev_warn(phydev, "%s is deprectated use phy_write_mmd instead\n",
+                   __func__);
+
        mmd_phy_indirect(phydev, devad, prtad);
 
        /* Write the data into MMD's selected register */
@@ -896,6 +902,9 @@ int phy_modify_mmd_indirect(struct phy_device *phydev, int 
prtad, int devad,
 {
        int ret;
 
+       phydev_warn(phydev, "%s is deprectated use phy_modify_mmd instead\n",
+                   __func__);
+
        ret = phy_read_mmd_indirect(phydev, prtad, devad);
        if (ret < 0)
                return ret;
-- 
2.39.2


Reply via email to