aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2015-10-13 03:58:02 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-13 20:31:54 -0400
commit7420aa4fed8cc7f3f7d7cc89ea1028fddfdacac8 (patch)
tree611671e15fd47007dbf704b8bc7d9157ee7211cc /drivers/base
parentea823c7cbffa7bae311d78761866ac4db344c89b (diff)
PM / Domains: Rename *pm_genpd_poweron|poweroff()
This is another step to get consistent names of functions in genpd. Let's rename the internal *pm_genpd_poweron|poweroff() into *genpd_poweron|poweroff(). Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 8724b4732e64..6e1bcdef7a79 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -181,10 +181,10 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool timed)
181} 181}
182 182
183/** 183/**
184 * genpd_queue_power_off_work - Queue up the execution of pm_genpd_poweroff(). 184 * genpd_queue_power_off_work - Queue up the execution of genpd_poweroff().
185 * @genpd: PM domait to power off. 185 * @genpd: PM domait to power off.
186 * 186 *
187 * Queue up the execution of pm_genpd_poweroff() unless it's already been done 187 * Queue up the execution of genpd_poweroff() unless it's already been done
188 * before. 188 * before.
189 */ 189 */
190static void genpd_queue_power_off_work(struct generic_pm_domain *genpd) 190static void genpd_queue_power_off_work(struct generic_pm_domain *genpd)
@@ -192,16 +192,16 @@ static void genpd_queue_power_off_work(struct generic_pm_domain *genpd)
192 queue_work(pm_wq, &genpd->power_off_work); 192 queue_work(pm_wq, &genpd->power_off_work);
193} 193}
194 194
195static int pm_genpd_poweron(struct generic_pm_domain *genpd); 195static int genpd_poweron(struct generic_pm_domain *genpd);
196 196
197/** 197/**
198 * __pm_genpd_poweron - Restore power to a given PM domain and its masters. 198 * __genpd_poweron - Restore power to a given PM domain and its masters.
199 * @genpd: PM domain to power up. 199 * @genpd: PM domain to power up.
200 * 200 *
201 * Restore power to @genpd and all of its masters so that it is possible to 201 * Restore power to @genpd and all of its masters so that it is possible to
202 * resume a device belonging to it. 202 * resume a device belonging to it.
203 */ 203 */
204static int __pm_genpd_poweron(struct generic_pm_domain *genpd) 204static int __genpd_poweron(struct generic_pm_domain *genpd)
205{ 205{
206 struct gpd_link *link; 206 struct gpd_link *link;
207 int ret = 0; 207 int ret = 0;
@@ -218,7 +218,7 @@ static int __pm_genpd_poweron(struct generic_pm_domain *genpd)
218 list_for_each_entry(link, &genpd->slave_links, slave_node) { 218 list_for_each_entry(link, &genpd->slave_links, slave_node) {
219 genpd_sd_counter_inc(link->master); 219 genpd_sd_counter_inc(link->master);
220 220
221 ret = pm_genpd_poweron(link->master); 221 ret = genpd_poweron(link->master);
222 if (ret) { 222 if (ret) {
223 genpd_sd_counter_dec(link->master); 223 genpd_sd_counter_dec(link->master);
224 goto err; 224 goto err;
@@ -244,15 +244,15 @@ static int __pm_genpd_poweron(struct generic_pm_domain *genpd)
244} 244}
245 245
246/** 246/**
247 * pm_genpd_poweron - Restore power to a given PM domain and its masters. 247 * genpd_poweron - Restore power to a given PM domain and its masters.
248 * @genpd: PM domain to power up. 248 * @genpd: PM domain to power up.
249 */ 249 */
250static int pm_genpd_poweron(struct generic_pm_domain *genpd) 250static int genpd_poweron(struct generic_pm_domain *genpd)
251{ 251{
252 int ret; 252 int ret;
253 253
254 mutex_lock(&genpd->lock); 254 mutex_lock(&genpd->lock);
255 ret = __pm_genpd_poweron(genpd); 255 ret = __genpd_poweron(genpd);
256 mutex_unlock(&genpd->lock); 256 mutex_unlock(&genpd->lock);
257 return ret; 257 return ret;
258} 258}
@@ -315,14 +315,14 @@ static int genpd_dev_pm_qos_notifier(struct notifier_block *nb,
315} 315}
316 316
317/** 317/**
318 * pm_genpd_poweroff - Remove power from a given PM domain. 318 * genpd_poweroff - Remove power from a given PM domain.
319 * @genpd: PM domain to power down. 319 * @genpd: PM domain to power down.
320 * @is_async: PM domain is powered down from a scheduled work 320 * @is_async: PM domain is powered down from a scheduled work
321 * 321 *
322 * If all of the @genpd's devices have been suspended and all of its subdomains 322 * If all of the @genpd's devices have been suspended and all of its subdomains
323 * have been powered down, remove power from @genpd. 323 * have been powered down, remove power from @genpd.
324 */ 324 */
325static int pm_genpd_poweroff(struct generic_pm_domain *genpd, bool is_async) 325static int genpd_poweroff(struct generic_pm_domain *genpd, bool is_async)
326{ 326{
327 struct pm_domain_data *pdd; 327 struct pm_domain_data *pdd;
328 struct gpd_link *link; 328 struct gpd_link *link;
@@ -370,10 +370,10 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd, bool is_async)
370 370
371 /* 371 /*
372 * If sd_count > 0 at this point, one of the subdomains hasn't 372 * If sd_count > 0 at this point, one of the subdomains hasn't
373 * managed to call pm_genpd_poweron() for the master yet after 373 * managed to call genpd_poweron() for the master yet after
374 * incrementing it. In that case pm_genpd_poweron() will wait 374 * incrementing it. In that case genpd_poweron() will wait
375 * for us to drop the lock, so we can call .power_off() and let 375 * for us to drop the lock, so we can call .power_off() and let
376 * the pm_genpd_poweron() restore power for us (this shouldn't 376 * the genpd_poweron() restore power for us (this shouldn't
377 * happen very often). 377 * happen very often).
378 */ 378 */
379 ret = genpd_power_off(genpd, true); 379 ret = genpd_power_off(genpd, true);
@@ -402,7 +402,7 @@ static void genpd_power_off_work_fn(struct work_struct *work)
402 genpd = container_of(work, struct generic_pm_domain, power_off_work); 402 genpd = container_of(work, struct generic_pm_domain, power_off_work);
403 403
404 mutex_lock(&genpd->lock); 404 mutex_lock(&genpd->lock);
405 pm_genpd_poweroff(genpd, true); 405 genpd_poweroff(genpd, true);
406 mutex_unlock(&genpd->lock); 406 mutex_unlock(&genpd->lock);
407} 407}
408 408
@@ -448,7 +448,7 @@ static int pm_genpd_runtime_suspend(struct device *dev)
448 return 0; 448 return 0;
449 449
450 mutex_lock(&genpd->lock); 450 mutex_lock(&genpd->lock);
451 pm_genpd_poweroff(genpd, false); 451 genpd_poweroff(genpd, false);
452 mutex_unlock(&genpd->lock); 452 mutex_unlock(&genpd->lock);
453 453
454 return 0; 454 return 0;
@@ -481,7 +481,7 @@ static int pm_genpd_runtime_resume(struct device *dev)
481 } 481 }
482 482
483 mutex_lock(&genpd->lock); 483 mutex_lock(&genpd->lock);
484 ret = __pm_genpd_poweron(genpd); 484 ret = __genpd_poweron(genpd);
485 mutex_unlock(&genpd->lock); 485 mutex_unlock(&genpd->lock);
486 486
487 if (ret) 487 if (ret)
@@ -694,7 +694,7 @@ static int pm_genpd_prepare(struct device *dev)
694 694
695 /* 695 /*
696 * The PM domain must be in the GPD_STATE_ACTIVE state at this point, 696 * The PM domain must be in the GPD_STATE_ACTIVE state at this point,
697 * so pm_genpd_poweron() will return immediately, but if the device 697 * so genpd_poweron() will return immediately, but if the device
698 * is suspended (e.g. it's been stopped by genpd_stop_dev()), we need 698 * is suspended (e.g. it's been stopped by genpd_stop_dev()), we need
699 * to make it operational. 699 * to make it operational.
700 */ 700 */
@@ -1793,7 +1793,7 @@ int genpd_dev_pm_attach(struct device *dev)
1793 1793
1794 dev->pm_domain->detach = genpd_dev_pm_detach; 1794 dev->pm_domain->detach = genpd_dev_pm_detach;
1795 dev->pm_domain->sync = genpd_dev_pm_sync; 1795 dev->pm_domain->sync = genpd_dev_pm_sync;
1796 ret = pm_genpd_poweron(pd); 1796 ret = genpd_poweron(pd);
1797 1797
1798out: 1798out:
1799 return ret ? -EPROBE_DEFER : 0; 1799 return ret ? -EPROBE_DEFER : 0;