Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02bd45a2 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent 99465f12
Loading
Loading
Loading
Loading
+3 −16
Original line number Original line Diff line number Diff line
@@ -529,21 +529,6 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd)


/*------------------------- Resume routines -------------------------*/
/*------------------------- Resume routines -------------------------*/


/**
 * dev_pm_skip_next_resume_phases - Skip next system resume phases for device.
 * @dev: Target device.
 *
 * Make the core skip the "early resume" and "resume" phases for @dev.
 *
 * This function can be called by middle-layer code during the "noirq" phase of
 * system resume if necessary, but not by device drivers.
 */
void dev_pm_skip_next_resume_phases(struct device *dev)
{
	dev->power.is_late_suspended = false;
	dev->power.is_suspended = false;
}

/**
/**
 * suspend_event - Return a "suspend" message for given "resume" one.
 * suspend_event - Return a "suspend" message for given "resume" one.
 * @resume_msg: PM message representing a system-wide resume transition.
 * @resume_msg: PM message representing a system-wide resume transition.
@@ -681,6 +666,9 @@ static int device_resume_noirq(struct device *dev, pm_message_t state, bool asyn
	dev->power.is_noirq_suspended = false;
	dev->power.is_noirq_suspended = false;


	if (skip_resume) {
	if (skip_resume) {
		/* Make the next phases of resume skip the device. */
		dev->power.is_late_suspended = false;
		dev->power.is_suspended = false;
		/*
		/*
		 * The device is going to be left in suspend, but it might not
		 * The device is going to be left in suspend, but it might not
		 * have been in runtime suspend before the system suspended, so
		 * have been in runtime suspend before the system suspended, so
@@ -689,7 +677,6 @@ static int device_resume_noirq(struct device *dev, pm_message_t state, bool asyn
		 * device again.
		 * device again.
		 */
		 */
		pm_runtime_set_suspended(dev);
		pm_runtime_set_suspended(dev);
		dev_pm_skip_next_resume_phases(dev);
	}
	}


Out:
Out:
+0 −1
Original line number Original line Diff line number Diff line
@@ -760,7 +760,6 @@ extern int pm_generic_poweroff_late(struct device *dev);
extern int pm_generic_poweroff(struct device *dev);
extern int pm_generic_poweroff(struct device *dev);
extern void pm_generic_complete(struct device *dev);
extern void pm_generic_complete(struct device *dev);


extern void dev_pm_skip_next_resume_phases(struct device *dev);
extern bool dev_pm_may_skip_resume(struct device *dev);
extern bool dev_pm_may_skip_resume(struct device *dev);
extern bool dev_pm_smart_suspend_and_suspended(struct device *dev);
extern bool dev_pm_smart_suspend_and_suspended(struct device *dev);