History

PM: sleep: Drop dev_pm_skip_next_resume_phases()

After recent hibernation-related changes, there are no more callers of dev_pm_skip_next_resume_phases() except for the PM core itself in which it is more straightforward to run the statements from that function directly, so do that and drop it.

Rafael J. Wysocki committed 7 years ago

Commit 02bd45a1 parent 99465f12 files · +3 −17Browse files

Unified · Split

2 files
  1. drivers/base/power/main.c +3 −16
  2. include/linux/pm.h +0 −1
drivers/base/power/main.c+3−16
@@ -529,21 +529,6 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd) · 528 unmodified lines
529529
530530 /*------------------------- Resume routines -------------------------*/
531531
532−/**
533− * dev_pm_skip_next_resume_phases - Skip next system resume phases for device.
534− * @dev: Target device.
535− *
536− * Make the core skip the "early resume" and "resume" phases for @dev.
537− *
538− * This function can be called by middle-layer code during the "noirq" phase of
539− * system resume if necessary, but not by device drivers.
540− */
541−void dev_pm_skip_next_resume_phases(struct device *dev)
542−{
543− dev->power.is_late_suspended = false;
544− dev->power.is_suspended = false;
545−}
546−
547532 /**
548533 * suspend_event - Return a "suspend" message for given "resume" one.
549534 * @resume_msg: PM message representing a system-wide resume transition.
@@ -681,6 +666,9 @@ Skip: · 131 unmodified lines
681666 dev->power.is_noirq_suspended = false;
682667
683668 if (skip_resume) {
669+ /* Make the next phases of resume skip the device. */
670+ dev->power.is_late_suspended = false;
671+ dev->power.is_suspended = false;
684672 /*
685673 * The device is going to be left in suspend, but it might not
686674 * have been in runtime suspend before the system suspended, so
@@ -689,7 +677,6 @@ Skip: · 2 unmodified lines
689677 * device again.
690678 */
691679 pm_runtime_set_suspended(dev);
692− dev_pm_skip_next_resume_phases(dev);
693680 }
694681
695682 Out:
include/linux/pm.h+0−1
@@ -760,7 +760,6 @@ extern int pm_generic_poweroff_late(struct device *dev); · 759 unmodified lines
760760 extern int pm_generic_poweroff(struct device *dev);
761761 extern void pm_generic_complete(struct device *dev);
762762
763−extern void dev_pm_skip_next_resume_phases(struct device *dev);
764763 extern bool dev_pm_may_skip_resume(struct device *dev);
765764 extern bool dev_pm_smart_suspend_and_suspended(struct device *dev);
766765

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t