Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <axel.lin@ingics.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Axel Lin and committed by
Kishon Vijay Abraham I
0f9722e3 af69decc

+4 -20
+4 -20
drivers/phy/phy-exynos-dp-video.c
··· 30 30 const struct exynos_dp_video_phy_drvdata *drvdata; 31 31 }; 32 32 33 - static void exynos_dp_video_phy_pwr_isol(struct exynos_dp_video_phy *state, 34 - unsigned int on) 35 - { 36 - unsigned int val; 37 - 38 - if (IS_ERR(state->regs)) 39 - return; 40 - 41 - val = on ? 0 : EXYNOS5_PHY_ENABLE; 42 - 43 - regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset, 44 - EXYNOS5_PHY_ENABLE, val); 45 - } 46 - 47 33 static int exynos_dp_video_phy_power_on(struct phy *phy) 48 34 { 49 35 struct exynos_dp_video_phy *state = phy_get_drvdata(phy); 50 36 51 37 /* Disable power isolation on DP-PHY */ 52 - exynos_dp_video_phy_pwr_isol(state, 0); 53 - 54 - return 0; 38 + return regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset, 39 + EXYNOS5_PHY_ENABLE, EXYNOS5_PHY_ENABLE); 55 40 } 56 41 57 42 static int exynos_dp_video_phy_power_off(struct phy *phy) ··· 44 59 struct exynos_dp_video_phy *state = phy_get_drvdata(phy); 45 60 46 61 /* Enable power isolation on DP-PHY */ 47 - exynos_dp_video_phy_pwr_isol(state, 1); 48 - 49 - return 0; 62 + return regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset, 63 + EXYNOS5_PHY_ENABLE, 0); 50 64 } 51 65 52 66 static struct phy_ops exynos_dp_video_phy_ops = {