diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-09-04 04:17:23 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-09-14 20:03:15 -0400 |
commit | f0489a5ef4d011e29f78021ad13a543e8769d619 (patch) | |
tree | ae78bd2d07cd07cfd34def48f2390dad0d7db7c7 | |
parent | 1840995c52d44bec8c20d6c07a706dc1499da9da (diff) |
PM / OPP: Rename opp init/free table routines
free-table routines are opposite of init-table ones, and must be named
to make that clear. Opposite of 'init' is 'exit', but those doesn't suit
really well.
Replace 'init' with 'add' and 'free' with 'remove'.
Reported-by: Pavel Machek <pavel@ucw.cz>
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 | 6 | ||||
-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 | 16 |
9 files changed, 44 insertions, 45 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 9602cc12d2f1..3286eec91d92 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_init_opp_table(cpu_dev)) { | 353 | if (of_add_opp_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 c3a738652d13..9f0a2929821b 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_init_opp_table and | 831 | * NOTE: "dynamic" parameter impacts OPPs added by the of_add_opp_table and |
832 | * freed by of_free_opp_table. | 832 | * freed by of_remove_opp_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,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_notifier); | |||
1213 | 1213 | ||
1214 | #ifdef CONFIG_OF | 1214 | #ifdef CONFIG_OF |
1215 | /** | 1215 | /** |
1216 | * of_free_opp_table() - Free OPP table entries created from static DT entries | 1216 | * of_remove_opp_table() - Free OPP table entries created from static DT entries |
1217 | * @dev: device pointer used to lookup device OPPs. | 1217 | * @dev: device pointer used to lookup device OPPs. |
1218 | * | 1218 | * |
1219 | * Free OPPs created using static entries present in DT. | 1219 | * Free OPPs created using static entries present in DT. |
@@ -1224,7 +1224,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_notifier); | |||
1224 | * that this function is *NOT* called under RCU protection or in contexts where | 1224 | * that this function is *NOT* called under RCU protection or in contexts where |
1225 | * mutex cannot be locked. | 1225 | * mutex cannot be locked. |
1226 | */ | 1226 | */ |
1227 | void of_free_opp_table(struct device *dev) | 1227 | void of_remove_opp_table(struct device *dev) |
1228 | { | 1228 | { |
1229 | struct device_opp *dev_opp; | 1229 | struct device_opp *dev_opp; |
1230 | struct dev_pm_opp *opp, *tmp; | 1230 | struct dev_pm_opp *opp, *tmp; |
@@ -1259,9 +1259,9 @@ void of_free_opp_table(struct device *dev) | |||
1259 | unlock: | 1259 | unlock: |
1260 | mutex_unlock(&dev_opp_list_lock); | 1260 | mutex_unlock(&dev_opp_list_lock); |
1261 | } | 1261 | } |
1262 | EXPORT_SYMBOL_GPL(of_free_opp_table); | 1262 | EXPORT_SYMBOL_GPL(of_remove_opp_table); |
1263 | 1263 | ||
1264 | void of_cpumask_free_opp_table(cpumask_var_t cpumask) | 1264 | void of_cpumask_remove_opp_table(cpumask_var_t cpumask) |
1265 | { | 1265 | { |
1266 | struct device *cpu_dev; | 1266 | struct device *cpu_dev; |
1267 | int cpu; | 1267 | int cpu; |
@@ -1276,10 +1276,10 @@ void of_cpumask_free_opp_table(cpumask_var_t cpumask) | |||
1276 | continue; | 1276 | continue; |
1277 | } | 1277 | } |
1278 | 1278 | ||
1279 | of_free_opp_table(cpu_dev); | 1279 | of_remove_opp_table(cpu_dev); |
1280 | } | 1280 | } |
1281 | } | 1281 | } |
1282 | EXPORT_SYMBOL_GPL(of_cpumask_free_opp_table); | 1282 | EXPORT_SYMBOL_GPL(of_cpumask_remove_opp_table); |
1283 | 1283 | ||
1284 | /* Returns opp descriptor node for a device, caller must do of_node_put() */ | 1284 | /* 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) | 1285 | static struct device_node *_of_get_opp_desc_node(struct device *dev) |
@@ -1295,8 +1295,7 @@ static struct device_node *_of_get_opp_desc_node(struct device *dev) | |||
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | /* Initializes OPP tables based on new bindings */ | 1297 | /* Initializes OPP tables based on new bindings */ |
1298 | static int _of_init_opp_table_v2(struct device *dev, | 1298 | static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np) |
1299 | struct device_node *opp_np) | ||
1300 | { | 1299 | { |
1301 | struct device_node *np; | 1300 | struct device_node *np; |
1302 | struct device_opp *dev_opp; | 1301 | struct device_opp *dev_opp; |
@@ -1338,13 +1337,13 @@ static int _of_init_opp_table_v2(struct device *dev, | |||
1338 | return 0; | 1337 | return 0; |
1339 | 1338 | ||
1340 | free_table: | 1339 | free_table: |
1341 | of_free_opp_table(dev); | 1340 | of_remove_opp_table(dev); |
1342 | 1341 | ||
1343 | return ret; | 1342 | return ret; |
1344 | } | 1343 | } |
1345 | 1344 | ||
1346 | /* Initializes OPP tables based on old-deprecated bindings */ | 1345 | /* Initializes OPP tables based on old-deprecated bindings */ |
1347 | static int _of_init_opp_table_v1(struct device *dev) | 1346 | static int _of_add_opp_table_v1(struct device *dev) |
1348 | { | 1347 | { |
1349 | const struct property *prop; | 1348 | const struct property *prop; |
1350 | const __be32 *val; | 1349 | const __be32 *val; |
@@ -1381,7 +1380,7 @@ static int _of_init_opp_table_v1(struct device *dev) | |||
1381 | } | 1380 | } |
1382 | 1381 | ||
1383 | /** | 1382 | /** |
1384 | * of_init_opp_table() - Initialize opp table from device tree | 1383 | * of_add_opp_table() - Initialize opp table from device tree |
1385 | * @dev: device pointer used to lookup device OPPs. | 1384 | * @dev: device pointer used to lookup device OPPs. |
1386 | * | 1385 | * |
1387 | * Register the initial OPP table with the OPP library for given device. | 1386 | * Register the initial OPP table with the OPP library for given device. |
@@ -1403,7 +1402,7 @@ static int _of_init_opp_table_v1(struct device *dev) | |||
1403 | * -ENODATA when empty 'operating-points' property is found | 1402 | * -ENODATA when empty 'operating-points' property is found |
1404 | * -EINVAL when invalid entries are found in opp-v2 table | 1403 | * -EINVAL when invalid entries are found in opp-v2 table |
1405 | */ | 1404 | */ |
1406 | int of_init_opp_table(struct device *dev) | 1405 | int of_add_opp_table(struct device *dev) |
1407 | { | 1406 | { |
1408 | struct device_node *opp_np; | 1407 | struct device_node *opp_np; |
1409 | int ret; | 1408 | int ret; |
@@ -1418,17 +1417,17 @@ int of_init_opp_table(struct device *dev) | |||
1418 | * Try old-deprecated bindings for backward compatibility with | 1417 | * Try old-deprecated bindings for backward compatibility with |
1419 | * older dtbs. | 1418 | * older dtbs. |
1420 | */ | 1419 | */ |
1421 | return _of_init_opp_table_v1(dev); | 1420 | return _of_add_opp_table_v1(dev); |
1422 | } | 1421 | } |
1423 | 1422 | ||
1424 | ret = _of_init_opp_table_v2(dev, opp_np); | 1423 | ret = _of_add_opp_table_v2(dev, opp_np); |
1425 | of_node_put(opp_np); | 1424 | of_node_put(opp_np); |
1426 | 1425 | ||
1427 | return ret; | 1426 | return ret; |
1428 | } | 1427 | } |
1429 | EXPORT_SYMBOL_GPL(of_init_opp_table); | 1428 | EXPORT_SYMBOL_GPL(of_add_opp_table); |
1430 | 1429 | ||
1431 | int of_cpumask_init_opp_table(cpumask_var_t cpumask) | 1430 | int of_cpumask_add_opp_table(cpumask_var_t cpumask) |
1432 | { | 1431 | { |
1433 | struct device *cpu_dev; | 1432 | struct device *cpu_dev; |
1434 | int cpu, ret = 0; | 1433 | int cpu, ret = 0; |
@@ -1443,20 +1442,20 @@ int of_cpumask_init_opp_table(cpumask_var_t cpumask) | |||
1443 | continue; | 1442 | continue; |
1444 | } | 1443 | } |
1445 | 1444 | ||
1446 | ret = of_init_opp_table(cpu_dev); | 1445 | ret = of_add_opp_table(cpu_dev); |
1447 | if (ret) { | 1446 | if (ret) { |
1448 | pr_err("%s: couldn't find opp table for cpu:%d, %d\n", | 1447 | pr_err("%s: couldn't find opp table for cpu:%d, %d\n", |
1449 | __func__, cpu, ret); | 1448 | __func__, cpu, ret); |
1450 | 1449 | ||
1451 | /* Free all other OPPs */ | 1450 | /* Free all other OPPs */ |
1452 | of_cpumask_free_opp_table(cpumask); | 1451 | of_cpumask_remove_opp_table(cpumask); |
1453 | break; | 1452 | break; |
1454 | } | 1453 | } |
1455 | } | 1454 | } |
1456 | 1455 | ||
1457 | return ret; | 1456 | return ret; |
1458 | } | 1457 | } |
1459 | EXPORT_SYMBOL_GPL(of_cpumask_init_opp_table); | 1458 | EXPORT_SYMBOL_GPL(of_cpumask_add_opp_table); |
1460 | 1459 | ||
1461 | /* Required only for V1 bindings, as v2 can manage it from DT itself */ | 1460 | /* Required only for V1 bindings, as v2 can manage it from DT itself */ |
1462 | int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) | 1461 | int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) |
diff --git a/drivers/cpufreq/arm_big_little.h b/drivers/cpufreq/arm_big_little.h index a211f7db9d32..d7ac320ead23 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_init_opp_table(). | 31 | * of_add_opp_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 36d91dba2965..47ac0ff54e3a 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_init_opp_table(cpu_dev); | 57 | ret = of_add_opp_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_free_opp_table, | 85 | .free_opp_table = of_remove_opp_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 7c0d70e2a861..df8333bb4f56 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c | |||
@@ -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_init_opp_table(policy->cpus); | 241 | of_cpumask_add_opp_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 |
@@ -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_free_opp_table(policy->cpus); | 371 | of_cpumask_remove_opp_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_free_opp_table(policy->related_cpus); | 388 | of_cpumask_remove_opp_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 21a90ed7f3d8..fc46813d3b83 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_init_opp_table(dvfs_info->dev); | 363 | ret = of_add_opp_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_free_opp_table(dvfs_info->dev); | 427 | of_remove_opp_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_free_opp_table(dvfs_info->dev); | 438 | of_remove_opp_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 380a90d3c57e..3802765aeb9f 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_init_opp_table(cpu_dev); | 205 | ret = of_add_opp_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_free_opp_table(cpu_dev); | 315 | of_remove_opp_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_free_opp_table(cpu_dev); | 343 | of_remove_opp_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 49caed293a3b..519e83146e86 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_init_opp_table(cpu_dev); | 347 | ret = of_add_opp_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_free_opp_table(cpu_dev); | 381 | of_remove_opp_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_free_opp_table(info->cpu_dev); | 407 | of_remove_opp_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 e817722ee3f0..20adcb4ce443 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h | |||
@@ -132,28 +132,28 @@ 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_init_opp_table(struct device *dev); | 135 | int of_add_opp_table(struct device *dev); |
136 | void of_free_opp_table(struct device *dev); | 136 | void of_remove_opp_table(struct device *dev); |
137 | int of_cpumask_init_opp_table(cpumask_var_t cpumask); | 137 | int of_cpumask_add_opp_table(cpumask_var_t cpumask); |
138 | void of_cpumask_free_opp_table(cpumask_var_t cpumask); | 138 | void of_cpumask_remove_opp_table(cpumask_var_t cpumask); |
139 | int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); | 139 | int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); |
140 | int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); | 140 | int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); |
141 | #else | 141 | #else |
142 | static inline int of_init_opp_table(struct device *dev) | 142 | static inline int of_add_opp_table(struct device *dev) |
143 | { | 143 | { |
144 | return -EINVAL; | 144 | return -EINVAL; |
145 | } | 145 | } |
146 | 146 | ||
147 | static inline void of_free_opp_table(struct device *dev) | 147 | static inline void of_remove_opp_table(struct device *dev) |
148 | { | 148 | { |
149 | } | 149 | } |
150 | 150 | ||
151 | static inline int of_cpumask_init_opp_table(cpumask_var_t cpumask) | 151 | static inline int of_cpumask_add_opp_table(cpumask_var_t cpumask) |
152 | { | 152 | { |
153 | return -ENOSYS; | 153 | return -ENOSYS; |
154 | } | 154 | } |
155 | 155 | ||
156 | static inline void of_cpumask_free_opp_table(cpumask_var_t cpumask) | 156 | static inline void of_cpumask_remove_opp_table(cpumask_var_t cpumask) |
157 | { | 157 | { |
158 | } | 158 | } |
159 | 159 | ||