summaryrefslogtreecommitdiff
path: root/drivers/phy/amlogic
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2019-04-10 14:13:06 +0800
committerKishon Vijay Abraham I <kishon@ti.com>2019-04-17 14:13:16 +0530
commit42c7cb71b5c2b014caab7861f2434f3907900d7c (patch)
tree92997f03989151060d70882d400678647ee70430 /drivers/phy/amlogic
parent752d31a3e19251e15ed241c00872ffe4f65bae0b (diff)
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: Chunfeng Yun <chunfeng.yun@mediatek.com> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/amlogic')
-rw-r--r--drivers/phy/amlogic/phy-meson-gxl-usb2.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
index 148ef0bdb9c1..4cbee412f2b0 100644
--- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
@@ -261,14 +261,9 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev)
if (IS_ERR(priv->regmap))
return PTR_ERR(priv->regmap);
- priv->clk = devm_clk_get(dev, "phy");
- if (IS_ERR(priv->clk)) {
- ret = PTR_ERR(priv->clk);
- if (ret == -ENOENT)
- priv->clk = NULL;
- else
- return ret;
- }
+ priv->clk = devm_clk_get_optional(dev, "phy");
+ if (IS_ERR(priv->clk))
+ return PTR_ERR(priv->clk);
priv->reset = devm_reset_control_get_optional_shared(dev, "phy");
if (IS_ERR(priv->reset))