[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+Px+wXJo1R5WU-Acn==DEqubzzZDfxnJpCeFvKoYzzrzr-H1A@mail.gmail.com>
Date: Mon, 12 Jul 2021 14:06:02 +0800
From: Tzung-Bi Shih <tzungbi@...gle.com>
To: Tinghan Shen <tinghan.shen@...iatek.com>
Cc: ohad@...ery.com, bjorn.andersson@...aro.org,
mathieu.poirier@...aro.org, robh+dt@...nel.org,
matthias.bgg@...il.com, linux-remoteproc@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
srv_heupstream@...iatek.com,
Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [v2 2/2] remoteproc: mediatek: Support mt8195 scp
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@...iatek.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().
Powered by blists - more mailing lists