lkml.org 
[lkml]   [2020]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/4] mmc: sdhci-xenon: use clk only with DT
On Fri, 20 Nov 2020 at 04:27, Marcin Wojtas <mw@semihalf.com> wrote:
>
> As a preparation for supporting ACPI, modify the driver
> to use the clk framework only when booting with DT -
> otherwise rely on the configuration done by firmware.
> For that purpose introduce also a custom SDHCI get_max_clock
> callback.
>
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>

[...]

> @@ -561,9 +574,11 @@ static int xenon_probe(struct platform_device *pdev)
> pm_runtime_put_noidle(&pdev->dev);
> xenon_sdhc_unprepare(host);
> err_clk_axi:
> - clk_disable_unprepare(priv->axi_clk);
> + if (dev->of_node)
> + clk_disable_unprepare(priv->axi_clk);
> err_clk:
> - clk_disable_unprepare(pltfm_host->clk);
> + if (dev->of_node)
> + clk_disable_unprepare(pltfm_host->clk);

There's no need to check the dev->of_node, I believe. The
clk_disable_unprepare() is capable of managing a NULL pointer as
in-parameter.

[...]

Kind regards
Uffe

\
 
 \ /
  Last update: 2020-11-24 12:32    [W:1.077 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site