mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table()
dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
@@ -48,7 +48,6 @@ static struct clk_bulk_data clks[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct device *cpu_dev;
|
static struct device *cpu_dev;
|
||||||
static bool free_opp;
|
|
||||||
static struct cpufreq_frequency_table *freq_table;
|
static struct cpufreq_frequency_table *freq_table;
|
||||||
static unsigned int max_freq;
|
static unsigned int max_freq;
|
||||||
static unsigned int transition_latency;
|
static unsigned int transition_latency;
|
||||||
@@ -390,9 +389,6 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
|
|||||||
goto put_reg;
|
goto put_reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Because we have added the OPPs here, we must free them */
|
|
||||||
free_opp = true;
|
|
||||||
|
|
||||||
if (of_machine_is_compatible("fsl,imx6ul") ||
|
if (of_machine_is_compatible("fsl,imx6ul") ||
|
||||||
of_machine_is_compatible("fsl,imx6ull")) {
|
of_machine_is_compatible("fsl,imx6ull")) {
|
||||||
ret = imx6ul_opp_check_speed_grading(cpu_dev);
|
ret = imx6ul_opp_check_speed_grading(cpu_dev);
|
||||||
@@ -507,8 +503,7 @@ soc_opp_out:
|
|||||||
free_freq_table:
|
free_freq_table:
|
||||||
dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
|
dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
|
||||||
out_free_opp:
|
out_free_opp:
|
||||||
if (free_opp)
|
dev_pm_opp_of_remove_table(cpu_dev);
|
||||||
dev_pm_opp_of_remove_table(cpu_dev);
|
|
||||||
put_reg:
|
put_reg:
|
||||||
if (!IS_ERR(arm_reg))
|
if (!IS_ERR(arm_reg))
|
||||||
regulator_put(arm_reg);
|
regulator_put(arm_reg);
|
||||||
@@ -528,8 +523,7 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
cpufreq_unregister_driver(&imx6q_cpufreq_driver);
|
cpufreq_unregister_driver(&imx6q_cpufreq_driver);
|
||||||
dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
|
dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
|
||||||
if (free_opp)
|
dev_pm_opp_of_remove_table(cpu_dev);
|
||||||
dev_pm_opp_of_remove_table(cpu_dev);
|
|
||||||
regulator_put(arm_reg);
|
regulator_put(arm_reg);
|
||||||
if (!IS_ERR(pu_reg))
|
if (!IS_ERR(pu_reg))
|
||||||
regulator_put(pu_reg);
|
regulator_put(pu_reg);
|
||||||
|
Reference in New Issue
Block a user