Skip to contentSkip to conversation

cpufreq: ti: move to new dev_pm_opp_set_supported_hw() API

PATCH In review Arnd Bergmann 2 participants 2 messages Feb 9, 2017 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: ti: move to new dev_pm_opp_set_supported_hw() API

We have a conflict between the interface change in one patch, and the newly added driver using the old interface:

drivers/cpufreq/ti-cpufreq.c: In function 'ti_cpufreq_init':
drivers/cpufreq/ti-cpufreq.c:250:6: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]

This adapts the driver accordingly.

Fixes fa30184d192e ("PM / OPP: Return opp_table from dev_pm_opp_set_*() routines")
Fixes 36cae4bca3bc ("cpufreq: ti: Add cpufreq driver to determine available OPPs at runtime")
---
 drivers/cpufreq/ti-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/ti-cpufreq.c +2 -2
index a2a4e84c6166..d1ae3e608f59 100644
@@ -247,8 +247,8 @@ static int ti_cpufreq_init(void)
 
 	of_node_put(opp_data->opp_node);
 
-	ret = dev_pm_opp_set_supported_hw(opp_data->cpu_dev, version,
-					  VERSION_COUNT);
+	ret = PTR_ERR_OR_ZERO(dev_pm_opp_set_supported_hw(opp_data->cpu_dev,
+						 version, VERSION_COUNT));
 	if (ret) {
 		dev_err(opp_data->cpu_dev,
 			"Failed to set supported hardware\n");
Signature · 1 line
2.9.0
#1 lore raw
Quoted 21 lines · Arnd Bergmann

We have a conflict between the interface change in one patch, and the newly added driver using the old interface:

drivers/cpufreq/ti-cpufreq.c: In function 'ti_cpufreq_init':
drivers/cpufreq/ti-cpufreq.c:250:6: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]

This adapts the driver accordingly.

Fixes fa30184d192e ("PM / OPP: Return opp_table from dev_pm_opp_set_*() routines")
Fixes 36cae4bca3bc ("cpufreq: ti: Add cpufreq driver to determine available OPPs at runtime")
---
 drivers/cpufreq/ti-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/ti-cpufreq.c +0 -0
index a2a4e84c6166..d1ae3e608f59 100644
@@ -247,8 +247,8 @@ static int ti_cpufreq_init(void)
 

drivers/cpufreq/ti-cpufreq.c static int ti_cpufreq_init(void)

Quoted 10 lines
drivers/cpufreq/ti-cpufreq.c +2 -3
        of_node_put(opp_data->opp_node);
 
-       ret = dev_pm_opp_set_supported_hw(opp_data->cpu_dev, version,
-                                         VERSION_COUNT);
+       ret = PTR_ERR_OR_ZERO(dev_pm_opp_set_supported_hw(opp_data->cpu_dev,
+                                                version, VERSION_COUNT));
        if (ret) {
                dev_err(opp_data->cpu_dev,
                        "Failed to set supported hardware\n");
--

Thanks for the fix, but I fixed this up manually in the original patch in the meantime.

Thanks,
Rafael