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
529 529
530/*------------------------- Resume routines -------------------------*/530/*------------------------- Resume routines -------------------------*/
531 531
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 */
541void 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
547/**532/**
548 * suspend_event - Return a "suspend" message for given "resume" one.533 * suspend_event - Return a "suspend" message for given "resume" one.
549 * @resume_msg: PM message representing a system-wide resume transition.534 * @resume_msg: PM message representing a system-wide resume transition.
@@ -681,6 +666,9 @@ Skip: · 131 unmodified lines
681 dev->power.is_noirq_suspended = false;666 dev->power.is_noirq_suspended = false;
682 667
683 if (skip_resume) {668 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;
684 /*672 /*
685 * The device is going to be left in suspend, but it might not673 * The device is going to be left in suspend, but it might not
686 * have been in runtime suspend before the system suspended, so674 * have been in runtime suspend before the system suspended, so
@@ -689,7 +677,6 @@ Skip: · 2 unmodified lines
689 * device again.677 * device again.
690 */678 */
691 pm_runtime_set_suspended(dev);679 pm_runtime_set_suspended(dev);
692 dev_pm_skip_next_resume_phases(dev);
693 }680 }
694 681
695Out:682Out:
include/linux/pm.h+0−1
@@ -760,7 +760,6 @@ extern int pm_generic_poweroff_late(struct device *dev); · 759 unmodified lines
760extern int pm_generic_poweroff(struct device *dev);760extern int pm_generic_poweroff(struct device *dev);
761extern void pm_generic_complete(struct device *dev);761extern void pm_generic_complete(struct device *dev);
762 762
763extern void dev_pm_skip_next_resume_phases(struct device *dev);
764extern bool dev_pm_may_skip_resume(struct device *dev);763extern bool dev_pm_may_skip_resume(struct device *dev);
765extern bool dev_pm_smart_suspend_and_suspended(struct device *dev);764extern bool dev_pm_smart_suspend_and_suspended(struct device *dev);
766 765

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