lkml.org 
[lkml]   [2019]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 5/5] usb: chipidea: msm: get optional clock by devm_clk_get_optional()
Date

> drivers/usb/chipidea/ci_hdrc_msm.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c
> b/drivers/usb/chipidea/ci_hdrc_msm.c
> index 880009987460..b8b3caad889c 100644
> --- a/drivers/usb/chipidea/ci_hdrc_msm.c
> +++ b/drivers/usb/chipidea/ci_hdrc_msm.c
> @@ -205,12 +205,9 @@ static int ci_hdrc_msm_probe(struct platform_device
> *pdev)
> if (IS_ERR(clk))
> return PTR_ERR(clk);
>
> - ci->fs_clk = clk = devm_clk_get(&pdev->dev, "fs");
> - if (IS_ERR(clk)) {
> - if (PTR_ERR(clk) == -EPROBE_DEFER)
> - return -EPROBE_DEFER;
> - ci->fs_clk = NULL;
> - }
> + ci->fs_clk = clk = devm_clk_get_optional(&pdev->dev, "fs");
> + if (IS_ERR(clk))
> + return PTR_ERR(clk);
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> ci->base = devm_ioremap_resource(&pdev->dev, res);
> --
> 2.20.1

Acked-by: Peter Chen <peter.chen@nxp.com>

\
 
 \ /
  Last update: 2019-04-04 09:30    [W:0.079 / U:29.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site