phy: exynos-dp-video: Kill exynos_dp_video_phy_pwr_isol function
Subsystems (2)
PATCH 1/1 phy: exynos-dp-video: Kill exynos_dp_video_phy_pwr_isol function
If IS_ERR(state->regs) the .probe fails.
So IS_ERR(state->regs) test in exynos_dp_video_phy_pwr_isol() is not necessary. exynos_dp_video_phy_pwr_isol() simply does a regmap_update_bits() call now, just call regmap_update_bits() instead and return proper return value.
Signed-off-by Axel Lin <[email protected]>
--- drivers/phy/phy-exynos-dp-video.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-)
drivers/phy/phy-exynos-dp-video.c +4 -20
@@ -30,28 +30,13 @@ struct exynos_dp_video_phy {const struct exynos_dp_video_phy_drvdata *drvdata; }; -static void exynos_dp_video_phy_pwr_isol (struct exynos_dp_video_phy *state, -unsigned int on) -{ -unsigned int val; - -if (IS_ERR (state->regs)) -return ; - - val = on ?0 :EXYNOS5_PHY_ENABLE ; - -regmap_update_bits (state->regs, state->drvdata->phy_ctrl_offset, -EXYNOS5_PHY_ENABLE , val); -} -static int exynos_dp_video_phy_power_on (struct phy *phy) {struct exynos_dp_video_phy *state =phy_get_drvdata (phy);/* Disable power isolation on DP-PHY */ -exynos_dp_video_phy_pwr_isol (state,0 ); - -return 0 ; +return regmap_update_bits (state->regs, state->drvdata->phy_ctrl_offset, +EXYNOS5_PHY_ENABLE ,EXYNOS5_PHY_ENABLE ); }static int exynos_dp_video_phy_power_off (struct phy *phy)
@@ -59,9 +44,8 @@ static int exynos_dp_video_phy_power_off(struct phy *phy)struct exynos_dp_video_phy *state =phy_get_drvdata (phy);/* Enable power isolation on DP-PHY */ -exynos_dp_video_phy_pwr_isol (state,1 ); - -return 0 ; +return regmap_update_bits (state->regs, state->drvdata->phy_ctrl_offset, +EXYNOS5_PHY_ENABLE ,0 ); }static struct phy_ops exynos_dp_video_phy_ops = {
Signature · 1 line
1.9.1
Quoted 6 lines · Axel Lin
If
IS_ERR(state->regs)the .probe fails.
SoIS_ERR(state->regs)test inexynos_dp_video_phy_pwr_isol()is not necessary.exynos_dp_video_phy_pwr_isol()simply does aregmap_update_bits()call now, just callregmap_update_bits()instead and return proper return value.Signed-off-by Axel Lin <[email protected]>
Reviewed-by Sylwester Nawrocki <[email protected]>