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.
Unified · Split
| @@ -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 | */ | ||
| 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 | |||
| 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 not | 673 | * The device is going to be left in suspend, but it might not |
| 686 | * have been in runtime suspend before the system suspended, so | 674 | * 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 | ||
| 695 | Out: | 682 | Out: |
| @@ -760,7 +760,6 @@ extern int pm_generic_poweroff_late(struct device *dev); · 759 unmodified lines | |||
| 760 | extern int pm_generic_poweroff(struct device *dev); | 760 | extern int pm_generic_poweroff(struct device *dev); |
| 761 | extern void pm_generic_complete(struct device *dev); | 761 | extern void pm_generic_complete(struct device *dev); |
| 762 | 762 | ||
| 763 | extern void dev_pm_skip_next_resume_phases(struct device *dev); | ||
| 764 | extern bool dev_pm_may_skip_resume(struct device *dev); | 763 | extern bool dev_pm_may_skip_resume(struct device *dev); |
| 765 | extern bool dev_pm_smart_suspend_and_suspended(struct device *dev); | 764 | extern bool dev_pm_smart_suspend_and_suspended(struct device *dev); |
| 766 | 765 | ||