Commit 1039596c authored by Chunfeng Yun's avatar Chunfeng Yun Committed by Kishon Vijay Abraham I

phy: qcom-qusb2: get optional clock by devm_clk_get_optional()

Use devm_clk_get_optional() to get optional clock

Cc: Andy Gross <andy.gross@linaro.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent b603c500
...@@ -822,14 +822,9 @@ static int qusb2_phy_probe(struct platform_device *pdev) ...@@ -822,14 +822,9 @@ static int qusb2_phy_probe(struct platform_device *pdev)
return ret; return ret;
} }
qphy->iface_clk = devm_clk_get(dev, "iface"); qphy->iface_clk = devm_clk_get_optional(dev, "iface");
if (IS_ERR(qphy->iface_clk)) { if (IS_ERR(qphy->iface_clk))
ret = PTR_ERR(qphy->iface_clk); return PTR_ERR(qphy->iface_clk);
if (ret == -EPROBE_DEFER)
return ret;
qphy->iface_clk = NULL;
dev_dbg(dev, "failed to get iface clk, %d\n", ret);
}
qphy->phy_reset = devm_reset_control_get_by_index(&pdev->dev, 0); qphy->phy_reset = devm_reset_control_get_by_index(&pdev->dev, 0);
if (IS_ERR(qphy->phy_reset)) { if (IS_ERR(qphy->phy_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