Skip to content

Commit 1039596

Browse files
Chunfeng Yunkishon
authored andcommitted
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: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
1 parent b603c50 commit 1039596

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

‎drivers/phy/qualcomm/phy-qcom-qusb2.c‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -822,14 +822,9 @@ static int qusb2_phy_probe(struct platform_device *pdev)
822822
return ret;
823823
}
824824

825-
qphy->iface_clk = devm_clk_get(dev, "iface");
826-
if (IS_ERR(qphy->iface_clk)) {
827-
ret = PTR_ERR(qphy->iface_clk);
828-
if (ret == -EPROBE_DEFER)
829-
return ret;
830-
qphy->iface_clk = NULL;
831-
dev_dbg(dev, "failed to get iface clk, %d\n", ret);
832-
}
825+
qphy->iface_clk = devm_clk_get_optional(dev, "iface");
826+
if (IS_ERR(qphy->iface_clk))
827+
return PTR_ERR(qphy->iface_clk);
833828

834829
qphy->phy_reset = devm_reset_control_get_by_index(&pdev->dev, 0);
835830
if (IS_ERR(qphy->phy_reset)) {

0 commit comments

Comments
 (0)