lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [v2 2/2] remoteproc: mediatek: Support mt8195 scp
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> 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().

\
 
 \ /
  Last update: 2021-07-12 08:06    [W:0.068 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site