diff options
author | Chanho Park <chanho61.park@samsung.com> | 2022-06-07 16:29:06 +0900 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-06-08 21:51:33 +0530 |
commit | f86c1d0a58b1f63a176f537e2f6851be49c20ad4 (patch) | |
tree | 84a65cf49df0f76061b2961aa526896b97f21d76 /drivers/phy/samsung/phy-samsung-ufs.c | |
parent | phy: samsung: ufs: constify samsung_ufs_phy_cfg (diff) | |
download | linux-dev-f86c1d0a58b1f63a176f537e2f6851be49c20ad4.tar.xz linux-dev-f86c1d0a58b1f63a176f537e2f6851be49c20ad4.zip |
phy: samsung: ufs: remove drvdata from struct samsung_ufs_phy
To change an offset of pmu_isol, we need to store its data instead of
having drvdata's pointer. The definition of the pmu_isol structure
should be extracted from samsung_ufs_phy_drvdata and rename the name
with samsung_ufs_phy_ prefix.
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Link: https://lore.kernel.org/r/20220607072907.127000-5-chanho61.park@samsung.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/samsung/phy-samsung-ufs.c')
-rw-r--r-- | drivers/phy/samsung/phy-samsung-ufs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c index cd1c02d2cdda..0c933e364064 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.c +++ b/drivers/phy/samsung/phy-samsung-ufs.c @@ -207,7 +207,7 @@ static int samsung_ufs_phy_init(struct phy *phy) ss_phy->lane_cnt = phy->attrs.bus_width; ss_phy->ufs_phy_state = CFG_PRE_INIT; - if (ss_phy->drvdata->has_symbol_clk) { + if (ss_phy->has_symbol_clk) { ret = samsung_ufs_phy_symbol_clk_init(ss_phy); if (ret) dev_err(ss_phy->dev, "failed to set ufs phy symbol clocks\n"); @@ -259,7 +259,7 @@ static int samsung_ufs_phy_exit(struct phy *phy) clk_disable_unprepare(ss_phy->ref_clk); - if (ss_phy->drvdata->has_symbol_clk) { + if (ss_phy->has_symbol_clk) { clk_disable_unprepare(ss_phy->tx0_symbol_clk); clk_disable_unprepare(ss_phy->rx0_symbol_clk); clk_disable_unprepare(ss_phy->rx1_symbol_clk); @@ -326,9 +326,10 @@ static int samsung_ufs_phy_probe(struct platform_device *pdev) drvdata = match->data; phy->dev = dev; - phy->drvdata = drvdata; phy->cfgs = drvdata->cfgs; - phy->isol = &drvdata->isol; + phy->has_symbol_clk = drvdata->has_symbol_clk; + memcpy(&phy->isol, &drvdata->isol, sizeof(phy->isol)); + phy->lane_cnt = PHY_DEF_LANE_CNT; phy_set_drvdata(gen_phy, phy); |