[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d51628d1-c930-ec13-990c-97cc47d80472@poczta.onet.pl>
Date: Sat, 7 Jan 2017 01:44:08 +0100
From: Michał Zegan <webczat_200@...zta.onet.pl>
To: Sudeep Holla <sudeep.holla@....com>, linux-clk@...r.kernel.org,
Stephen Boyd <sboyd@...eaurora.org>,
Michael Turquette <mturquette@...libre.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Neil Armstrong <narmstrong@...libre.com>
Subject: Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node
is disabled
seems the patch works as intended.
W dniu 06.01.2017 o 13:34, Sudeep Holla pisze:
> Currently we add the virtual cpufreq device unconditionally even when
> the SCPI DVFS clock provider node is disabled. This will cause cpufreq
> driver to throw errors when it gets initailised on boot/modprobe and
> also when the CPUs are hot-plugged back in.
>
> This patch fixes the issue by adding the virtual cpufreq device only if
> the SCPI DVFS clock provider is available and registered.
>
> Fixes: 9490f01e2471 ("clk: scpi: add support for cpufreq virtual device")
> Reported-by: Michał Zegan <webczat_200@...zta.onet.pl>
> Cc: Neil Armstrong <narmstrong@...libre.com>
> Cc: Michael Turquette <mturquette@...libre.com>
> Cc: Stephen Boyd <sboyd@...eaurora.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
> ---
> drivers/clk/clk-scpi.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
> index 2a3e9d8e88b0..96d37175d0ad 100644
> --- a/drivers/clk/clk-scpi.c
> +++ b/drivers/clk/clk-scpi.c
> @@ -290,13 +290,15 @@ static int scpi_clocks_probe(struct platform_device *pdev)
> of_node_put(child);
> return ret;
> }
> - }
> - /* Add the virtual cpufreq device */
> - cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
> - -1, NULL, 0);
> - if (IS_ERR(cpufreq_dev))
> - pr_warn("unable to register cpufreq device");
>
> + if (match->data != &scpi_dvfs_ops)
> + continue;
> + /* Add the virtual cpufreq device if it's DVFS clock provider */
> + cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
> + -1, NULL, 0);
> + if (IS_ERR(cpufreq_dev))
> + pr_warn("unable to register cpufreq device");
> + }
> return 0;
> }
>
>
Download attachment "signature.asc" of type "application/pgp-signature" (526 bytes)
Powered by blists - more mailing lists