[1/2] cpufreq: qcom: fix compatibility issue with old binding
diff mbox series

Message ID 20200422140827.1726-1-ansuelsmth@gmail.com
State New
Delegated to: viresh kumar
Headers show
Series
  • [1/2] cpufreq: qcom: fix compatibility issue with old binding
Related show

Commit Message

Ansuel Smith April 22, 2020, 2:08 p.m. UTC
Binding has changed from operating-points-v2-kryo-cpu to
operating-points-v2-qcom-cpu. Also check for old binding in driver
probe.

Fixes: a8811ec764f9 cpufreq: qcom: Add support for krait based socs
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 drivers/cpufreq/qcom-cpufreq-nvmem.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Georgi Djakov April 22, 2020, 3:26 p.m. UTC | #1
Hi Ansuel,

On 4/22/20 17:08, Ansuel Smith wrote:
> Binding has changed from operating-points-v2-kryo-cpu to
> operating-points-v2-qcom-cpu. Also check for old binding in driver
> probe.
> 
> Fixes: a8811ec764f9 cpufreq: qcom: Add support for krait based socs

The correct format is: Fixes: %h (\"%s\")

> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  drivers/cpufreq/qcom-cpufreq-nvmem.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> index a1b8238872a2..8a0411efc79a 100644
> --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> @@ -278,6 +278,10 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
>  		return -ENOENT;
>  
>  	ret = of_device_is_compatible(np, "operating-points-v2-qcom-cpu");
> +	if (!ret)
> +		ret = of_device_is_compatible(np,
> +					      "operating-points-v2-kyro-cpu");

There is a typo in the compatible string.

Thanks,
Georgi

> +
>  	if (!ret) {
>  		of_node_put(np);
>  		return -ENOENT;
>

Patch
diff mbox series

diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
index a1b8238872a2..8a0411efc79a 100644
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -278,6 +278,10 @@  static int qcom_cpufreq_probe(struct platform_device *pdev)
 		return -ENOENT;
 
 	ret = of_device_is_compatible(np, "operating-points-v2-qcom-cpu");
+	if (!ret)
+		ret = of_device_is_compatible(np,
+					      "operating-points-v2-kyro-cpu");
+
 	if (!ret) {
 		of_node_put(np);
 		return -ENOENT;