summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2025-03-03 23:17:18 +0300
committerJakub Kicinski <kuba@kernel.org>2025-03-06 06:13:53 +0300
commitdc5a6164fedacdcdbb51a2a340ca264191a5b82c (patch)
tree6ae440968731443b85e93dc01f5772ab3f868eef
parent890fe6841d8107a1d1bfebe9b61f9c81f483ee42 (diff)
downloadlinux-dc5a6164fedacdcdbb51a2a340ca264191a5b82c.tar.xz
net: phy: mediatek: use new phy_package_shared getters
Use the new getters for members of struct phy_package_shared. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/356a257f-68d0-47bc-a474-4dafaeaa149f@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/phy/mediatek/mtk-ge-soc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/phy/mediatek/mtk-ge-soc.c b/drivers/net/phy/mediatek/mtk-ge-soc.c
index 9de6fbb45564..175cf5239bba 100644
--- a/drivers/net/phy/mediatek/mtk-ge-soc.c
+++ b/drivers/net/phy/mediatek/mtk-ge-soc.c
@@ -8,6 +8,7 @@
#include <linux/phy.h>
#include <linux/regmap.h>
+#include "../phylib.h"
#include "mtk.h"
#define MTK_GPHY_ID_MT7981 0x03a29461
@@ -1278,7 +1279,7 @@ static int mt798x_phy_led_hw_control_set(struct phy_device *phydev, u8 index,
static bool mt7988_phy_led_get_polarity(struct phy_device *phydev, int led_num)
{
- struct mtk_socphy_shared *priv = phydev->shared->priv;
+ struct mtk_socphy_shared *priv = phy_package_get_priv(phydev);
u32 polarities;
if (led_num == 0)
@@ -1317,7 +1318,7 @@ static int mt7988_phy_fix_leds_polarities(struct phy_device *phydev)
static int mt7988_phy_probe_shared(struct phy_device *phydev)
{
struct device_node *np = dev_of_node(&phydev->mdio.bus->dev);
- struct mtk_socphy_shared *shared = phydev->shared->priv;
+ struct mtk_socphy_shared *shared = phy_package_get_priv(phydev);
struct regmap *regmap;
u32 reg;
int ret;
@@ -1368,7 +1369,7 @@ static int mt7988_phy_probe(struct phy_device *phydev)
return err;
}
- shared = phydev->shared->priv;
+ shared = phy_package_get_priv(phydev);
priv = &shared->priv[phydev->mdio.addr];
phydev->priv = priv;