diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-05-14 18:53:26 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-06-12 15:32:31 -0400 |
commit | e39a71ef80877f4e30d808af9acceec80f4d2f7c (patch) | |
tree | e9d4ff1618328cf3a3fafee04621b9776ca169de /drivers/base | |
parent | 1380a37e3da5d9e14ea5c2a4c6ab2b307a2798ea (diff) |
PM: Rename device_power_down/up()
Rename the functions performing "_noirq" dev_pm_ops
operations from device_power_down() and device_power_up()
to device_suspend_noirq() and device_resume_noirq().
The new function names are chosen to show that the functions
are responsible for calling the _noirq() versions to finalize
the suspend/resume operation. The current function names do
not perform power down/up anymore so the names may be misleading.
Global function renames:
- device_power_down() -> device_suspend_noirq()
- device_power_up() -> device_resume_noirq()
Static function renames:
- suspend_device_noirq() -> __device_suspend_noirq()
- resume_device_noirq() -> __device_resume_noirq()
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Len Brown <lenb@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/main.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 3e4bc699bc0f..c5a35bc9d63b 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -315,13 +315,13 @@ static void pm_dev_err(struct device *dev, pm_message_t state, char *info, | |||
315 | /*------------------------- Resume routines -------------------------*/ | 315 | /*------------------------- Resume routines -------------------------*/ |
316 | 316 | ||
317 | /** | 317 | /** |
318 | * resume_device_noirq - Power on one device (early resume). | 318 | * __device_resume_noirq - Power on one device (early resume). |
319 | * @dev: Device. | 319 | * @dev: Device. |
320 | * @state: PM transition of the system being carried out. | 320 | * @state: PM transition of the system being carried out. |
321 | * | 321 | * |
322 | * Must be called with interrupts disabled. | 322 | * Must be called with interrupts disabled. |
323 | */ | 323 | */ |
324 | static int resume_device_noirq(struct device *dev, pm_message_t state) | 324 | static int __device_resume_noirq(struct device *dev, pm_message_t state) |
325 | { | 325 | { |
326 | int error = 0; | 326 | int error = 0; |
327 | 327 | ||
@@ -363,7 +363,7 @@ static void dpm_power_up(pm_message_t state) | |||
363 | int error; | 363 | int error; |
364 | 364 | ||
365 | dev->power.status = DPM_OFF; | 365 | dev->power.status = DPM_OFF; |
366 | error = resume_device_noirq(dev, state); | 366 | error = __device_resume_noirq(dev, state); |
367 | if (error) | 367 | if (error) |
368 | pm_dev_err(dev, state, " early", error); | 368 | pm_dev_err(dev, state, " early", error); |
369 | } | 369 | } |
@@ -371,18 +371,18 @@ static void dpm_power_up(pm_message_t state) | |||
371 | } | 371 | } |
372 | 372 | ||
373 | /** | 373 | /** |
374 | * device_power_up - Turn on all devices that need special attention. | 374 | * device_resume_noirq - Turn on all devices that need special attention. |
375 | * @state: PM transition of the system being carried out. | 375 | * @state: PM transition of the system being carried out. |
376 | * | 376 | * |
377 | * Call the "early" resume handlers and enable device drivers to receive | 377 | * Call the "early" resume handlers and enable device drivers to receive |
378 | * interrupts. | 378 | * interrupts. |
379 | */ | 379 | */ |
380 | void device_power_up(pm_message_t state) | 380 | void device_resume_noirq(pm_message_t state) |
381 | { | 381 | { |
382 | dpm_power_up(state); | 382 | dpm_power_up(state); |
383 | resume_device_irqs(); | 383 | resume_device_irqs(); |
384 | } | 384 | } |
385 | EXPORT_SYMBOL_GPL(device_power_up); | 385 | EXPORT_SYMBOL_GPL(device_resume_noirq); |
386 | 386 | ||
387 | /** | 387 | /** |
388 | * resume_device - Restore state for one device. | 388 | * resume_device - Restore state for one device. |
@@ -577,13 +577,13 @@ static pm_message_t resume_event(pm_message_t sleep_state) | |||
577 | } | 577 | } |
578 | 578 | ||
579 | /** | 579 | /** |
580 | * suspend_device_noirq - Shut down one device (late suspend). | 580 | * __device_suspend_noirq - Shut down one device (late suspend). |
581 | * @dev: Device. | 581 | * @dev: Device. |
582 | * @state: PM transition of the system being carried out. | 582 | * @state: PM transition of the system being carried out. |
583 | * | 583 | * |
584 | * This is called with interrupts off and only a single CPU running. | 584 | * This is called with interrupts off and only a single CPU running. |
585 | */ | 585 | */ |
586 | static int suspend_device_noirq(struct device *dev, pm_message_t state) | 586 | static int __device_suspend_noirq(struct device *dev, pm_message_t state) |
587 | { | 587 | { |
588 | int error = 0; | 588 | int error = 0; |
589 | 589 | ||
@@ -602,7 +602,7 @@ static int suspend_device_noirq(struct device *dev, pm_message_t state) | |||
602 | } | 602 | } |
603 | 603 | ||
604 | /** | 604 | /** |
605 | * device_power_down - Shut down special devices. | 605 | * device_suspend_noirq - Shut down special devices. |
606 | * @state: PM transition of the system being carried out. | 606 | * @state: PM transition of the system being carried out. |
607 | * | 607 | * |
608 | * Prevent device drivers from receiving interrupts and call the "late" | 608 | * Prevent device drivers from receiving interrupts and call the "late" |
@@ -610,7 +610,7 @@ static int suspend_device_noirq(struct device *dev, pm_message_t state) | |||
610 | * | 610 | * |
611 | * Must be called under dpm_list_mtx. | 611 | * Must be called under dpm_list_mtx. |
612 | */ | 612 | */ |
613 | int device_power_down(pm_message_t state) | 613 | int device_suspend_noirq(pm_message_t state) |
614 | { | 614 | { |
615 | struct device *dev; | 615 | struct device *dev; |
616 | int error = 0; | 616 | int error = 0; |
@@ -618,7 +618,7 @@ int device_power_down(pm_message_t state) | |||
618 | suspend_device_irqs(); | 618 | suspend_device_irqs(); |
619 | mutex_lock(&dpm_list_mtx); | 619 | mutex_lock(&dpm_list_mtx); |
620 | list_for_each_entry_reverse(dev, &dpm_list, power.entry) { | 620 | list_for_each_entry_reverse(dev, &dpm_list, power.entry) { |
621 | error = suspend_device_noirq(dev, state); | 621 | error = __device_suspend_noirq(dev, state); |
622 | if (error) { | 622 | if (error) { |
623 | pm_dev_err(dev, state, " late", error); | 623 | pm_dev_err(dev, state, " late", error); |
624 | break; | 624 | break; |
@@ -627,10 +627,10 @@ int device_power_down(pm_message_t state) | |||
627 | } | 627 | } |
628 | mutex_unlock(&dpm_list_mtx); | 628 | mutex_unlock(&dpm_list_mtx); |
629 | if (error) | 629 | if (error) |
630 | device_power_up(resume_event(state)); | 630 | device_resume_noirq(resume_event(state)); |
631 | return error; | 631 | return error; |
632 | } | 632 | } |
633 | EXPORT_SYMBOL_GPL(device_power_down); | 633 | EXPORT_SYMBOL_GPL(device_suspend_noirq); |
634 | 634 | ||
635 | /** | 635 | /** |
636 | * suspend_device - Save state of one device. | 636 | * suspend_device - Save state of one device. |