Commit 42c7cb71 authored by Chunfeng Yun's avatar Chunfeng Yun Committed by Kishon Vijay Abraham I

phy: phy-meson-gxl-usb2: get optional clock by devm_clk_get_optional()

Use devm_clk_get_optional() to get optional clock

Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 752d31a3
...@@ -261,14 +261,9 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev) ...@@ -261,14 +261,9 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev)
if (IS_ERR(priv->regmap)) if (IS_ERR(priv->regmap))
return PTR_ERR(priv->regmap); return PTR_ERR(priv->regmap);
priv->clk = devm_clk_get(dev, "phy"); priv->clk = devm_clk_get_optional(dev, "phy");
if (IS_ERR(priv->clk)) { if (IS_ERR(priv->clk))
ret = PTR_ERR(priv->clk); return PTR_ERR(priv->clk);
if (ret == -ENOENT)
priv->clk = NULL;
else
return ret;
}
priv->reset = devm_reset_control_get_optional_shared(dev, "phy"); priv->reset = devm_reset_control_get_optional_shared(dev, "phy");
if (IS_ERR(priv->reset)) if (IS_ERR(priv->reset))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment