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 /drivers/base | |
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>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/opp.c | 41 |
1 files changed, 21 insertions, 20 deletions
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 |