aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2016-06-20 13:56:52 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2016-07-25 04:34:20 -0400
commit352051ef1ff5efa8ba050bc3a581dbf136a1f97b (patch)
tree6e0fcf8dbeda48ae823306ef5626323fe2355f59 /drivers/phy
parent110754563c52b9cf375d48cfbe93cc1a5e92d530 (diff)
phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off()
There's no reason to store the return value of rockchip_emmc_phy_power() in a variable nor to check it. Just return it. Signed-off-by: Douglas Anderson <dianders@chromium.org> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-rockchip-emmc.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c
index 2d059c046978..23fe50864526 100644
--- a/drivers/phy/phy-rockchip-emmc.c
+++ b/drivers/phy/phy-rockchip-emmc.c
@@ -169,20 +169,14 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy,
169static int rockchip_emmc_phy_power_off(struct phy *phy) 169static int rockchip_emmc_phy_power_off(struct phy *phy)
170{ 170{
171 struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); 171 struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
172 int ret = 0;
173 172
174 /* Power down emmc phy analog blocks */ 173 /* Power down emmc phy analog blocks */
175 ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF); 174 return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF);
176 if (ret)
177 return ret;
178
179 return 0;
180} 175}
181 176
182static int rockchip_emmc_phy_power_on(struct phy *phy) 177static int rockchip_emmc_phy_power_on(struct phy *phy)
183{ 178{
184 struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); 179 struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
185 int ret = 0;
186 180
187 /* DLL operation: 200 MHz */ 181 /* DLL operation: 200 MHz */
188 regmap_write(rk_phy->reg_base, 182 regmap_write(rk_phy->reg_base,
@@ -213,11 +207,7 @@ static int rockchip_emmc_phy_power_on(struct phy *phy)
213 PHYCTRL_OTAPDLYSEL_SHIFT)); 207 PHYCTRL_OTAPDLYSEL_SHIFT));
214 208
215 /* Power up emmc phy analog blocks */ 209 /* Power up emmc phy analog blocks */
216 ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON); 210 return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON);
217 if (ret)
218 return ret;
219
220 return 0;
221} 211}
222 212
223static const struct phy_ops ops = { 213static const struct phy_ops ops = {