diff options
author | Chunfeng Yun | 2019-04-10 08:13:05 +0200 |
---|---|---|
committer | Kishon Vijay Abraham I | 2019-04-17 10:43:15 +0200 |
commit | 752d31a3e19251e15ed241c00872ffe4f65bae0b (patch) | |
tree | 2a6535423dd8d69c8106fc93abd22c504dd854ba /drivers/phy/socionext/phy-uniphier-usb3hs.c | |
parent | phy: qcom-qusb2: get optional clock by devm_clk_get_optional() (diff) | |
download | kernel-qcow2-linux-752d31a3e19251e15ed241c00872ffe4f65bae0b.tar.gz kernel-qcow2-linux-752d31a3e19251e15ed241c00872ffe4f65bae0b.tar.xz kernel-qcow2-linux-752d31a3e19251e15ed241c00872ffe4f65bae0b.zip |
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: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/socionext/phy-uniphier-usb3hs.c')
-rw-r--r-- | drivers/phy/socionext/phy-uniphier-usb3hs.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/phy/socionext/phy-uniphier-usb3hs.c b/drivers/phy/socionext/phy-uniphier-usb3hs.c index b1b048be6166..50f379fc4e06 100644 --- a/drivers/phy/socionext/phy-uniphier-usb3hs.c +++ b/drivers/phy/socionext/phy-uniphier-usb3hs.c @@ -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 - return PTR_ERR(priv->clk_ext); - } + 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)) |