[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250519102618.4thbahapz3lfmfo5@vireshk-i7>
Date: Mon, 19 May 2025 15:56:18 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Jon Hunter <jonathanh@...dia.com>
Cc: webgeek1234@...il.com, "Rafael J. Wysocki" <rafael@...nel.org>,
Thierry Reding <thierry.reding@...il.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH v4 2/2] cpufreq: tegra124: Allow building as a module
On 14-05-25, 11:31, Jon Hunter wrote:
> > +static void tegra124_cpufreq_remove(struct platform_device *pdev)
> > +{
> > + struct tegra124_cpufreq_priv *priv = dev_get_drvdata(&pdev->dev);
> > +
> > + if (!IS_ERR(priv->cpufreq_dt_pdev)) {
> > + platform_device_unregister(priv->cpufreq_dt_pdev);
> > + priv->cpufreq_dt_pdev = ERR_PTR(-ENODEV);
> > + }
> > +
> > + clk_put(priv->pllp_clk);
> > + clk_put(priv->pllx_clk);
> > + clk_put(priv->dfll_clk);
> > + clk_put(priv->cpu_clk);
>
>
> If we use devm_clk_get() in probe, then we should be able to avoid this.
Not sure if we can do that. The clks belong to the CPU device, while
the devm_* functions are using &pdev->dev. The CPU device never goes
away and so the resources won't get freed if we use devm for the CPU
device.
--
viresh
Powered by blists - more mailing lists