diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-09-04 04:17:24 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-09-14 20:03:16 -0400 |
commit | 8f8d37b2537a28b5b2e3cb60dfc85a2a1303f99b (patch) | |
tree | 787d57b31328223f5c3dedd11830dce2f63f3acd | |
parent | f0489a5ef4d011e29f78021ad13a543e8769d619 (diff) |
PM / OPP: Prefix exported opp routines with dev_pm_opp_
That's the naming convention followed in most of opp core, but few
routines didn't follow this, fix them.
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 2 | ||||
-rw-r--r-- | drivers/base/power/opp.c | 41 | ||||
-rw-r--r-- | drivers/cpufreq/arm_big_little.h | 2 | ||||
-rw-r--r-- | drivers/cpufreq/arm_big_little_dt.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq-dt.c | 10 | ||||
-rw-r--r-- | drivers/cpufreq/exynos5440-cpufreq.c | 6 | ||||
-rw-r--r-- | drivers/cpufreq/imx6q-cpufreq.c | 6 | ||||
-rw-r--r-- | drivers/cpufreq/mt8173-cpufreq.c | 6 | ||||
-rw-r--r-- | include/linux/pm_opp.h | 24 |
9 files changed, 51 insertions, 50 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 3286eec91d92..3878494bd118 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -350,7 +350,7 @@ static void __init imx6q_opp_init(void) | |||
350 | return; | 350 | return; |
351 | } | 351 | } |
352 | 352 | ||
353 | if (of_add_opp_table(cpu_dev)) { | 353 | if (dev_pm_opp_of_add_table(cpu_dev)) { |
354 | pr_warn("failed to init OPP table\n"); | 354 | pr_warn("failed to init OPP table\n"); |
355 | goto put_node; | 355 | goto put_node; |
356 | } | 356 | } |
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 9f0a2929821b..aeff1cfb46f2 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c | |||
@@ -828,8 +828,8 @@ static int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, | |||
828 | * The opp is made available by default and it can be controlled using | 828 | * The opp is made available by default and it can be controlled using |
829 | * dev_pm_opp_enable/disable functions and may be removed by dev_pm_opp_remove. | 829 | * dev_pm_opp_enable/disable functions and may be removed by dev_pm_opp_remove. |
830 | * | 830 | * |
831 | * NOTE: "dynamic" parameter impacts OPPs added by the of_add_opp_table and | 831 | * NOTE: "dynamic" parameter impacts OPPs added by the dev_pm_opp_of_add_table |
832 | * freed by of_remove_opp_table. | 832 | * and freed by dev_pm_opp_of_remove_table. |
833 | * | 833 | * |
834 | * Locking: The internal device_opp and opp structures are RCU protected. | 834 | * Locking: The internal device_opp and opp structures are RCU protected. |
835 | * Hence this function internally uses RCU updater strategy with mutex locks | 835 | * Hence this function internally uses RCU updater strategy with mutex locks |
@@ -1213,7 +1213,8 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_notifier); | |||
1213 | 1213 | ||
1214 | #ifdef CONFIG_OF | 1214 | #ifdef CONFIG_OF |
1215 | /** | 1215 | /** |
1216 | * of_remove_opp_table() - Free OPP table entries created from static DT entries | 1216 | * dev_pm_opp_of_remove_table() - Free OPP table entries created from static DT |
1217 | * entries | ||
1217 | * @dev: device pointer used to lookup device OPPs. | 1218 | * @dev: device pointer used to lookup device OPPs. |
1218 | * | 1219 | * |
1219 | * Free OPPs created using static entries present in DT. | 1220 | * Free OPPs created using static entries present in DT. |
@@ -1224,7 +1225,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_notifier); | |||
1224 | * that this function is *NOT* called under RCU protection or in contexts where | 1225 | * that this function is *NOT* called under RCU protection or in contexts where |
1225 | * mutex cannot be locked. | 1226 | * mutex cannot be locked. |
1226 | */ | 1227 | */ |
1227 | void of_remove_opp_table(struct device *dev) | 1228 | void dev_pm_opp_of_remove_table(struct device *dev) |
1228 | { | 1229 | { |
1229 | struct device_opp *dev_opp; | 1230 | struct device_opp *dev_opp; |
1230 | struct dev_pm_opp *opp, *tmp; | 1231 | struct dev_pm_opp *opp, *tmp; |
@@ -1259,9 +1260,9 @@ void of_remove_opp_table(struct device *dev) | |||
1259 | unlock: | 1260 | unlock: |
1260 | mutex_unlock(&dev_opp_list_lock); | 1261 | mutex_unlock(&dev_opp_list_lock); |
1261 | } | 1262 | } |
1262 | EXPORT_SYMBOL_GPL(of_remove_opp_table); | 1263 | EXPORT_SYMBOL_GPL(dev_pm_opp_of_remove_table); |
1263 | 1264 | ||
1264 | void of_cpumask_remove_opp_table(cpumask_var_t cpumask) | 1265 | void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask) |
1265 | { | 1266 | { |
1266 | struct device *cpu_dev; | 1267 | struct device *cpu_dev; |
1267 | int cpu; | 1268 | int cpu; |
@@ -1276,10 +1277,10 @@ void of_cpumask_remove_opp_table(cpumask_var_t cpumask) | |||
1276 | continue; | 1277 | continue; |
1277 | } | 1278 | } |
1278 | 1279 | ||
1279 | of_remove_opp_table(cpu_dev); | 1280 | dev_pm_opp_of_remove_table(cpu_dev); |
1280 | } | 1281 | } |
1281 | } | 1282 | } |
1282 | EXPORT_SYMBOL_GPL(of_cpumask_remove_opp_table); | 1283 | EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_remove_table); |
1283 | 1284 | ||
1284 | /* Returns opp descriptor node for a device, caller must do of_node_put() */ | 1285 | /* Returns opp descriptor node for a device, caller must do of_node_put() */ |
1285 | static struct device_node *_of_get_opp_desc_node(struct device *dev) | 1286 | static struct device_node *_of_get_opp_desc_node(struct device *dev) |
@@ -1337,7 +1338,7 @@ static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np) | |||
1337 | return 0; | 1338 | return 0; |
1338 | 1339 | ||
1339 | free_table: | 1340 | free_table: |
1340 | of_remove_opp_table(dev); | 1341 | dev_pm_opp_of_remove_table(dev); |
1341 | 1342 | ||
1342 | return ret; | 1343 | return ret; |
1343 | } | 1344 | } |
@@ -1380,7 +1381,7 @@ static int _of_add_opp_table_v1(struct device *dev) | |||
1380 | } | 1381 | } |
1381 | 1382 | ||
1382 | /** | 1383 | /** |
1383 | * of_add_opp_table() - Initialize opp table from device tree | 1384 | * dev_pm_opp_of_add_table() - Initialize opp table from device tree |
1384 | * @dev: device pointer used to lookup device OPPs. | 1385 | * @dev: device pointer used to lookup device OPPs. |
1385 | * | 1386 | * |
1386 | * Register the initial OPP table with the OPP library for given device. | 1387 | * Register the initial OPP table with the OPP library for given device. |
@@ -1402,7 +1403,7 @@ static int _of_add_opp_table_v1(struct device *dev) | |||
1402 | * -ENODATA when empty 'operating-points' property is found | 1403 | * -ENODATA when empty 'operating-points' property is found |
1403 | * -EINVAL when invalid entries are found in opp-v2 table | 1404 | * -EINVAL when invalid entries are found in opp-v2 table |
1404 | */ | 1405 | */ |
1405 | int of_add_opp_table(struct device *dev) | 1406 | int dev_pm_opp_of_add_table(struct device *dev) |
1406 | { | 1407 | { |
1407 | struct device_node *opp_np; | 1408 | struct device_node *opp_np; |
1408 | int ret; | 1409 | int ret; |
@@ -1425,9 +1426,9 @@ int of_add_opp_table(struct device *dev) | |||
1425 | 1426 | ||
1426 | return ret; | 1427 | return ret; |
1427 | } | 1428 | } |
1428 | EXPORT_SYMBOL_GPL(of_add_opp_table); | 1429 | EXPORT_SYMBOL_GPL(dev_pm_opp_of_add_table); |
1429 | 1430 | ||
1430 | int of_cpumask_add_opp_table(cpumask_var_t cpumask) | 1431 | int dev_pm_opp_of_cpumask_add_table(cpumask_var_t cpumask) |
1431 | { | 1432 | { |
1432 | struct device *cpu_dev; | 1433 | struct device *cpu_dev; |
1433 | int cpu, ret = 0; | 1434 | int cpu, ret = 0; |
@@ -1442,23 +1443,23 @@ int of_cpumask_add_opp_table(cpumask_var_t cpumask) | |||
1442 | continue; | 1443 | continue; |
1443 | } | 1444 | } |
1444 | 1445 | ||
1445 | ret = of_add_opp_table(cpu_dev); | 1446 | ret = dev_pm_opp_of_add_table(cpu_dev); |
1446 | if (ret) { | 1447 | if (ret) { |
1447 | pr_err("%s: couldn't find opp table for cpu:%d, %d\n", | 1448 | pr_err("%s: couldn't find opp table for cpu:%d, %d\n", |
1448 | __func__, cpu, ret); | 1449 | __func__, cpu, ret); |
1449 | 1450 | ||
1450 | /* Free all other OPPs */ | 1451 | /* Free all other OPPs */ |
1451 | of_cpumask_remove_opp_table(cpumask); | 1452 | dev_pm_opp_of_cpumask_remove_table(cpumask); |
1452 | break; | 1453 | break; |
1453 | } | 1454 | } |
1454 | } | 1455 | } |
1455 | 1456 | ||
1456 | return ret; | 1457 | return ret; |
1457 | } | 1458 | } |
1458 | EXPORT_SYMBOL_GPL(of_cpumask_add_opp_table); | 1459 | EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table); |
1459 | 1460 | ||
1460 | /* Required only for V1 bindings, as v2 can manage it from DT itself */ | 1461 | /* Required only for V1 bindings, as v2 can manage it from DT itself */ |
1461 | int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) | 1462 | int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) |
1462 | { | 1463 | { |
1463 | struct device_list_opp *list_dev; | 1464 | struct device_list_opp *list_dev; |
1464 | struct device_opp *dev_opp; | 1465 | struct device_opp *dev_opp; |
@@ -1496,7 +1497,7 @@ out_rcu_read_unlock: | |||
1496 | 1497 | ||
1497 | return 0; | 1498 | return 0; |
1498 | } | 1499 | } |
1499 | EXPORT_SYMBOL_GPL(set_cpus_sharing_opps); | 1500 | EXPORT_SYMBOL_GPL(dev_pm_opp_set_sharing_cpus); |
1500 | 1501 | ||
1501 | /* | 1502 | /* |
1502 | * Works only for OPP v2 bindings. | 1503 | * Works only for OPP v2 bindings. |
@@ -1504,7 +1505,7 @@ EXPORT_SYMBOL_GPL(set_cpus_sharing_opps); | |||
1504 | * cpumask should be already set to mask of cpu_dev->id. | 1505 | * cpumask should be already set to mask of cpu_dev->id. |
1505 | * Returns -ENOENT if operating-points-v2 bindings aren't supported. | 1506 | * Returns -ENOENT if operating-points-v2 bindings aren't supported. |
1506 | */ | 1507 | */ |
1507 | int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) | 1508 | int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) |
1508 | { | 1509 | { |
1509 | struct device_node *np, *tmp_np; | 1510 | struct device_node *np, *tmp_np; |
1510 | struct device *tcpu_dev; | 1511 | struct device *tcpu_dev; |
@@ -1554,5 +1555,5 @@ put_cpu_node: | |||
1554 | of_node_put(np); | 1555 | of_node_put(np); |
1555 | return ret; | 1556 | return ret; |
1556 | } | 1557 | } |
1557 | EXPORT_SYMBOL_GPL(of_get_cpus_sharing_opps); | 1558 | EXPORT_SYMBOL_GPL(dev_pm_opp_of_get_sharing_cpus); |
1558 | #endif | 1559 | #endif |
diff --git a/drivers/cpufreq/arm_big_little.h b/drivers/cpufreq/arm_big_little.h index d7ac320ead23..b88889d9387e 100644 --- a/drivers/cpufreq/arm_big_little.h +++ b/drivers/cpufreq/arm_big_little.h | |||
@@ -28,7 +28,7 @@ struct cpufreq_arm_bL_ops { | |||
28 | 28 | ||
29 | /* | 29 | /* |
30 | * This must set opp table for cpu_dev in a similar way as done by | 30 | * This must set opp table for cpu_dev in a similar way as done by |
31 | * of_add_opp_table(). | 31 | * dev_pm_opp_of_add_table(). |
32 | */ | 32 | */ |
33 | int (*init_opp_table)(struct device *cpu_dev); | 33 | int (*init_opp_table)(struct device *cpu_dev); |
34 | 34 | ||
diff --git a/drivers/cpufreq/arm_big_little_dt.c b/drivers/cpufreq/arm_big_little_dt.c index 47ac0ff54e3a..16ddeefe9443 100644 --- a/drivers/cpufreq/arm_big_little_dt.c +++ b/drivers/cpufreq/arm_big_little_dt.c | |||
@@ -54,7 +54,7 @@ static int dt_init_opp_table(struct device *cpu_dev) | |||
54 | return -ENOENT; | 54 | return -ENOENT; |
55 | } | 55 | } |
56 | 56 | ||
57 | ret = of_add_opp_table(cpu_dev); | 57 | ret = dev_pm_opp_of_add_table(cpu_dev); |
58 | of_node_put(np); | 58 | of_node_put(np); |
59 | 59 | ||
60 | return ret; | 60 | return ret; |
@@ -82,7 +82,7 @@ static struct cpufreq_arm_bL_ops dt_bL_ops = { | |||
82 | .name = "dt-bl", | 82 | .name = "dt-bl", |
83 | .get_transition_latency = dt_get_transition_latency, | 83 | .get_transition_latency = dt_get_transition_latency, |
84 | .init_opp_table = dt_init_opp_table, | 84 | .init_opp_table = dt_init_opp_table, |
85 | .free_opp_table = of_remove_opp_table, | 85 | .free_opp_table = dev_pm_opp_of_remove_table, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static int generic_bL_probe(struct platform_device *pdev) | 88 | static int generic_bL_probe(struct platform_device *pdev) |
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index df8333bb4f56..90d64081ddb3 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c | |||
@@ -216,7 +216,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | /* Get OPP-sharing information from "operating-points-v2" bindings */ | 218 | /* Get OPP-sharing information from "operating-points-v2" bindings */ |
219 | ret = of_get_cpus_sharing_opps(cpu_dev, policy->cpus); | 219 | ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus); |
220 | if (ret) { | 220 | if (ret) { |
221 | /* | 221 | /* |
222 | * operating-points-v2 not supported, fallback to old method of | 222 | * operating-points-v2 not supported, fallback to old method of |
@@ -238,7 +238,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) | |||
238 | * | 238 | * |
239 | * OPPs might be populated at runtime, don't check for error here | 239 | * OPPs might be populated at runtime, don't check for error here |
240 | */ | 240 | */ |
241 | of_cpumask_add_opp_table(policy->cpus); | 241 | dev_pm_opp_of_cpumask_add_table(policy->cpus); |
242 | 242 | ||
243 | /* | 243 | /* |
244 | * But we need OPP table to function so if it is not there let's | 244 | * But we need OPP table to function so if it is not there let's |
@@ -261,7 +261,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) | |||
261 | * OPP tables are initialized only for policy->cpu, do it for | 261 | * OPP tables are initialized only for policy->cpu, do it for |
262 | * others as well. | 262 | * others as well. |
263 | */ | 263 | */ |
264 | ret = set_cpus_sharing_opps(cpu_dev, policy->cpus); | 264 | ret = dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); |
265 | if (ret) | 265 | if (ret) |
266 | dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", | 266 | dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", |
267 | __func__, ret); | 267 | __func__, ret); |
@@ -368,7 +368,7 @@ out_free_cpufreq_table: | |||
368 | out_free_priv: | 368 | out_free_priv: |
369 | kfree(priv); | 369 | kfree(priv); |
370 | out_free_opp: | 370 | out_free_opp: |
371 | of_cpumask_remove_opp_table(policy->cpus); | 371 | dev_pm_opp_of_cpumask_remove_table(policy->cpus); |
372 | out_node_put: | 372 | out_node_put: |
373 | of_node_put(np); | 373 | of_node_put(np); |
374 | out_put_reg_clk: | 374 | out_put_reg_clk: |
@@ -385,7 +385,7 @@ static int cpufreq_exit(struct cpufreq_policy *policy) | |||
385 | 385 | ||
386 | cpufreq_cooling_unregister(priv->cdev); | 386 | cpufreq_cooling_unregister(priv->cdev); |
387 | dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table); | 387 | dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table); |
388 | of_cpumask_remove_opp_table(policy->related_cpus); | 388 | dev_pm_opp_of_cpumask_remove_table(policy->related_cpus); |
389 | clk_put(policy->clk); | 389 | clk_put(policy->clk); |
390 | if (!IS_ERR(priv->cpu_reg)) | 390 | if (!IS_ERR(priv->cpu_reg)) |
391 | regulator_put(priv->cpu_reg); | 391 | regulator_put(priv->cpu_reg); |
diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c index fc46813d3b83..c0f3373706f4 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c | |||
@@ -360,7 +360,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) | |||
360 | goto err_put_node; | 360 | goto err_put_node; |
361 | } | 361 | } |
362 | 362 | ||
363 | ret = of_add_opp_table(dvfs_info->dev); | 363 | ret = dev_pm_opp_of_add_table(dvfs_info->dev); |
364 | if (ret) { | 364 | if (ret) { |
365 | dev_err(dvfs_info->dev, "failed to init OPP table: %d\n", ret); | 365 | dev_err(dvfs_info->dev, "failed to init OPP table: %d\n", ret); |
366 | goto err_put_node; | 366 | goto err_put_node; |
@@ -424,7 +424,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) | |||
424 | err_free_table: | 424 | err_free_table: |
425 | dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); | 425 | dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); |
426 | err_free_opp: | 426 | err_free_opp: |
427 | of_remove_opp_table(dvfs_info->dev); | 427 | dev_pm_opp_of_remove_table(dvfs_info->dev); |
428 | err_put_node: | 428 | err_put_node: |
429 | of_node_put(np); | 429 | of_node_put(np); |
430 | dev_err(&pdev->dev, "%s: failed initialization\n", __func__); | 430 | dev_err(&pdev->dev, "%s: failed initialization\n", __func__); |
@@ -435,7 +435,7 @@ static int exynos_cpufreq_remove(struct platform_device *pdev) | |||
435 | { | 435 | { |
436 | cpufreq_unregister_driver(&exynos_driver); | 436 | cpufreq_unregister_driver(&exynos_driver); |
437 | dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); | 437 | dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); |
438 | of_remove_opp_table(dvfs_info->dev); | 438 | dev_pm_opp_of_remove_table(dvfs_info->dev); |
439 | return 0; | 439 | return 0; |
440 | } | 440 | } |
441 | 441 | ||
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 3802765aeb9f..84fbc8e8fc56 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c | |||
@@ -202,7 +202,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) | |||
202 | */ | 202 | */ |
203 | num = dev_pm_opp_get_opp_count(cpu_dev); | 203 | num = dev_pm_opp_get_opp_count(cpu_dev); |
204 | if (num < 0) { | 204 | if (num < 0) { |
205 | ret = of_add_opp_table(cpu_dev); | 205 | ret = dev_pm_opp_of_add_table(cpu_dev); |
206 | if (ret < 0) { | 206 | if (ret < 0) { |
207 | dev_err(cpu_dev, "failed to init OPP table: %d\n", ret); | 207 | dev_err(cpu_dev, "failed to init OPP table: %d\n", ret); |
208 | goto put_reg; | 208 | goto put_reg; |
@@ -312,7 +312,7 @@ free_freq_table: | |||
312 | dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); | 312 | dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); |
313 | out_free_opp: | 313 | out_free_opp: |
314 | if (free_opp) | 314 | if (free_opp) |
315 | of_remove_opp_table(cpu_dev); | 315 | dev_pm_opp_of_remove_table(cpu_dev); |
316 | put_reg: | 316 | put_reg: |
317 | if (!IS_ERR(arm_reg)) | 317 | if (!IS_ERR(arm_reg)) |
318 | regulator_put(arm_reg); | 318 | regulator_put(arm_reg); |
@@ -340,7 +340,7 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev) | |||
340 | cpufreq_unregister_driver(&imx6q_cpufreq_driver); | 340 | cpufreq_unregister_driver(&imx6q_cpufreq_driver); |
341 | dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); | 341 | dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); |
342 | if (free_opp) | 342 | if (free_opp) |
343 | of_remove_opp_table(cpu_dev); | 343 | dev_pm_opp_of_remove_table(cpu_dev); |
344 | regulator_put(arm_reg); | 344 | regulator_put(arm_reg); |
345 | if (!IS_ERR(pu_reg)) | 345 | if (!IS_ERR(pu_reg)) |
346 | regulator_put(pu_reg); | 346 | regulator_put(pu_reg); |
diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c index 519e83146e86..83001dc5b646 100644 --- a/drivers/cpufreq/mt8173-cpufreq.c +++ b/drivers/cpufreq/mt8173-cpufreq.c | |||
@@ -344,7 +344,7 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu) | |||
344 | /* Both presence and absence of sram regulator are valid cases. */ | 344 | /* Both presence and absence of sram regulator are valid cases. */ |
345 | sram_reg = regulator_get_exclusive(cpu_dev, "sram"); | 345 | sram_reg = regulator_get_exclusive(cpu_dev, "sram"); |
346 | 346 | ||
347 | ret = of_add_opp_table(cpu_dev); | 347 | ret = dev_pm_opp_of_add_table(cpu_dev); |
348 | if (ret) { | 348 | if (ret) { |
349 | pr_warn("no OPP table for cpu%d\n", cpu); | 349 | pr_warn("no OPP table for cpu%d\n", cpu); |
350 | goto out_free_resources; | 350 | goto out_free_resources; |
@@ -378,7 +378,7 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu) | |||
378 | return 0; | 378 | return 0; |
379 | 379 | ||
380 | out_free_opp_table: | 380 | out_free_opp_table: |
381 | of_remove_opp_table(cpu_dev); | 381 | dev_pm_opp_of_remove_table(cpu_dev); |
382 | 382 | ||
383 | out_free_resources: | 383 | out_free_resources: |
384 | if (!IS_ERR(proc_reg)) | 384 | if (!IS_ERR(proc_reg)) |
@@ -404,7 +404,7 @@ static void mtk_cpu_dvfs_info_release(struct mtk_cpu_dvfs_info *info) | |||
404 | if (!IS_ERR(info->inter_clk)) | 404 | if (!IS_ERR(info->inter_clk)) |
405 | clk_put(info->inter_clk); | 405 | clk_put(info->inter_clk); |
406 | 406 | ||
407 | of_remove_opp_table(info->cpu_dev); | 407 | dev_pm_opp_of_remove_table(info->cpu_dev); |
408 | } | 408 | } |
409 | 409 | ||
410 | static int mtk_cpufreq_init(struct cpufreq_policy *policy) | 410 | static int mtk_cpufreq_init(struct cpufreq_policy *policy) |
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 20adcb4ce443..9a2e50337af9 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h | |||
@@ -132,37 +132,37 @@ static inline struct srcu_notifier_head *dev_pm_opp_get_notifier( | |||
132 | #endif /* CONFIG_PM_OPP */ | 132 | #endif /* CONFIG_PM_OPP */ |
133 | 133 | ||
134 | #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) | 134 | #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) |
135 | int of_add_opp_table(struct device *dev); | 135 | int dev_pm_opp_of_add_table(struct device *dev); |
136 | void of_remove_opp_table(struct device *dev); | 136 | void dev_pm_opp_of_remove_table(struct device *dev); |
137 | int of_cpumask_add_opp_table(cpumask_var_t cpumask); | 137 | int dev_pm_opp_of_cpumask_add_table(cpumask_var_t cpumask); |
138 | void of_cpumask_remove_opp_table(cpumask_var_t cpumask); | 138 | void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask); |
139 | int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); | 139 | int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask); |
140 | int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); | 140 | int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask); |
141 | #else | 141 | #else |
142 | static inline int of_add_opp_table(struct device *dev) | 142 | static inline int dev_pm_opp_of_add_table(struct device *dev) |
143 | { | 143 | { |
144 | return -EINVAL; | 144 | return -EINVAL; |
145 | } | 145 | } |
146 | 146 | ||
147 | static inline void of_remove_opp_table(struct device *dev) | 147 | static inline void dev_pm_opp_of_remove_table(struct device *dev) |
148 | { | 148 | { |
149 | } | 149 | } |
150 | 150 | ||
151 | static inline int of_cpumask_add_opp_table(cpumask_var_t cpumask) | 151 | static inline int dev_pm_opp_of_cpumask_add_table(cpumask_var_t cpumask) |
152 | { | 152 | { |
153 | return -ENOSYS; | 153 | return -ENOSYS; |
154 | } | 154 | } |
155 | 155 | ||
156 | static inline void of_cpumask_remove_opp_table(cpumask_var_t cpumask) | 156 | static inline void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask) |
157 | { | 157 | { |
158 | } | 158 | } |
159 | 159 | ||
160 | static inline int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) | 160 | static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) |
161 | { | 161 | { |
162 | return -ENOSYS; | 162 | return -ENOSYS; |
163 | } | 163 | } |
164 | 164 | ||
165 | static inline int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) | 165 | static inline int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) |
166 | { | 166 | { |
167 | return -ENOSYS; | 167 | return -ENOSYS; |
168 | } | 168 | } |