Commit 752d31a3 authored by Chunfeng Yun's avatar Chunfeng Yun Committed by Kishon Vijay Abraham I
Browse files

phy: socionext: get optional clock by devm_clk_get_optional()



Use devm_clk_get_optional() to get optional clock

Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 1039596c
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -335,13 +335,9 @@ static int uniphier_u3hsphy_probe(struct platform_device *pdev)
	if (IS_ERR(priv->clk_parent))
		return PTR_ERR(priv->clk_parent);

	priv->clk_ext = devm_clk_get(dev, "phy-ext");
	if (IS_ERR(priv->clk_ext)) {
		if (PTR_ERR(priv->clk_ext) == -ENOENT)
			priv->clk_ext = NULL;
		else
	priv->clk_ext = devm_clk_get_optional(dev, "phy-ext");
	if (IS_ERR(priv->clk_ext))
		return PTR_ERR(priv->clk_ext);
	}

	priv->rst = devm_reset_control_get_shared(dev, "phy");
	if (IS_ERR(priv->rst))
+3 −7
Original line number Diff line number Diff line
@@ -238,13 +238,9 @@ static int uniphier_u3ssphy_probe(struct platform_device *pdev)
		if (IS_ERR(priv->clk))
			return PTR_ERR(priv->clk);

		priv->clk_ext = devm_clk_get(dev, "phy-ext");
		if (IS_ERR(priv->clk_ext)) {
			if (PTR_ERR(priv->clk_ext) == -ENOENT)
				priv->clk_ext = NULL;
			else
		priv->clk_ext = devm_clk_get_optional(dev, "phy-ext");
		if (IS_ERR(priv->clk_ext))
			return PTR_ERR(priv->clk_ext);
		}

		priv->rst = devm_reset_control_get_shared(dev, "phy");
		if (IS_ERR(priv->rst))