Re: [v2 2/2] remoteproc: mediatek: Support mt8195 scp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@xxxxxxxxxxxx> wrote:
> @@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev)
>         if (ret)
>                 goto destroy_mutex;
>
> -       scp->clk = devm_clk_get(dev, "main");
> -       if (IS_ERR(scp->clk)) {
> -               dev_err(dev, "Failed to get clock\n");
> -               ret = PTR_ERR(scp->clk);
> -               goto release_dev_mem;
> +       if (of_get_property(np, "clocks", NULL)) {
> +               scp->clk = devm_clk_get(dev, "main");
> +               if (IS_ERR(scp->clk)) {
> +                       dev_err(dev, "Failed to get clock\n");
> +                       ret = PTR_ERR(scp->clk);
> +                       goto release_dev_mem;
> +               }
Use devm_clk_get_optional().



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux