PM: sleep: core: Rename dev_pm_may_skip_resume()
The name of dev_pm_may_skip_resume() may be easily confused with the power.may_skip_resume flag which is not checked by that function, so rename the former as dev_pm_skip_resume(). No functional impact. Suggested-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
0fe8a1be59
commit
76c70cb58c
@ -1034,7 +1034,7 @@ device to be left in suspend after system-wide transitions to the working state.
|
|||||||
This flag is checked by the PM core, but the PCI bus type informs the PM core
|
This flag is checked by the PM core, but the PCI bus type informs the PM core
|
||||||
which devices may be left in suspend from its perspective (that happens during
|
which devices may be left in suspend from its perspective (that happens during
|
||||||
the "noirq" phase of system-wide suspend and analogous transitions) and next it
|
the "noirq" phase of system-wide suspend and analogous transitions) and next it
|
||||||
uses the dev_pm_may_skip_resume() helper to decide whether or not to return from
|
uses the dev_pm_skip_resume() helper to decide whether or not to return from
|
||||||
pci_pm_resume_noirq() and pci_pm_resume_early() upfront.
|
pci_pm_resume_noirq() and pci_pm_resume_early() upfront.
|
||||||
|
|
||||||
3.2. Device Runtime Power Management
|
3.2. Device Runtime Power Management
|
||||||
|
@ -1093,7 +1093,7 @@ static int acpi_lpss_resume_early(struct device *dev)
|
|||||||
if (pdata->dev_desc->resume_from_noirq)
|
if (pdata->dev_desc->resume_from_noirq)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (dev_pm_may_skip_resume(dev))
|
if (dev_pm_skip_resume(dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return acpi_lpss_do_resume_early(dev);
|
return acpi_lpss_do_resume_early(dev);
|
||||||
@ -1105,7 +1105,7 @@ static int acpi_lpss_resume_noirq(struct device *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Follow acpi_subsys_resume_noirq(). */
|
/* Follow acpi_subsys_resume_noirq(). */
|
||||||
if (dev_pm_may_skip_resume(dev))
|
if (dev_pm_skip_resume(dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = pm_generic_resume_noirq(dev);
|
ret = pm_generic_resume_noirq(dev);
|
||||||
|
@ -1127,7 +1127,7 @@ EXPORT_SYMBOL_GPL(acpi_subsys_suspend_noirq);
|
|||||||
*/
|
*/
|
||||||
static int acpi_subsys_resume_noirq(struct device *dev)
|
static int acpi_subsys_resume_noirq(struct device *dev)
|
||||||
{
|
{
|
||||||
if (dev_pm_may_skip_resume(dev))
|
if (dev_pm_skip_resume(dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return pm_generic_resume_noirq(dev);
|
return pm_generic_resume_noirq(dev);
|
||||||
@ -1145,7 +1145,7 @@ static int acpi_subsys_resume_early(struct device *dev)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (dev_pm_may_skip_resume(dev))
|
if (dev_pm_skip_resume(dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = acpi_dev_resume(dev);
|
ret = acpi_dev_resume(dev);
|
||||||
|
@ -562,7 +562,7 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd)
|
|||||||
/*------------------------- Resume routines -------------------------*/
|
/*------------------------- Resume routines -------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dev_pm_may_skip_resume - System-wide device resume optimization check.
|
* dev_pm_skip_resume - System-wide device resume optimization check.
|
||||||
* @dev: Target device.
|
* @dev: Target device.
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
@ -572,7 +572,7 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd)
|
|||||||
* - The logical negation of %power.must_resume otherwise (that is, when the
|
* - The logical negation of %power.must_resume otherwise (that is, when the
|
||||||
* transition under way is RESUME).
|
* transition under way is RESUME).
|
||||||
*/
|
*/
|
||||||
bool dev_pm_may_skip_resume(struct device *dev)
|
bool dev_pm_skip_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
if (pm_transition.event == PM_EVENT_RESTORE)
|
if (pm_transition.event == PM_EVENT_RESTORE)
|
||||||
return false;
|
return false;
|
||||||
@ -611,7 +611,7 @@ static int device_resume_noirq(struct device *dev, pm_message_t state, bool asyn
|
|||||||
if (!dpm_wait_for_superior(dev, async))
|
if (!dpm_wait_for_superior(dev, async))
|
||||||
goto Out;
|
goto Out;
|
||||||
|
|
||||||
skip_resume = dev_pm_may_skip_resume(dev);
|
skip_resume = dev_pm_skip_resume(dev);
|
||||||
/*
|
/*
|
||||||
* If the driver callback is skipped below or by the middle layer
|
* If the driver callback is skipped below or by the middle layer
|
||||||
* callback and device_resume_early() also skips the driver callback for
|
* callback and device_resume_early() also skips the driver callback for
|
||||||
@ -797,7 +797,7 @@ static int device_resume_early(struct device *dev, pm_message_t state, bool asyn
|
|||||||
if (callback)
|
if (callback)
|
||||||
goto Run;
|
goto Run;
|
||||||
|
|
||||||
if (dev_pm_may_skip_resume(dev))
|
if (dev_pm_skip_resume(dev))
|
||||||
goto Skip;
|
goto Skip;
|
||||||
|
|
||||||
if (dev->driver && dev->driver->pm) {
|
if (dev->driver && dev->driver->pm) {
|
||||||
|
@ -891,7 +891,7 @@ static int pci_pm_resume_noirq(struct device *dev)
|
|||||||
pci_power_t prev_state = pci_dev->current_state;
|
pci_power_t prev_state = pci_dev->current_state;
|
||||||
bool skip_bus_pm = pci_dev->skip_bus_pm;
|
bool skip_bus_pm = pci_dev->skip_bus_pm;
|
||||||
|
|
||||||
if (dev_pm_may_skip_resume(dev))
|
if (dev_pm_skip_resume(dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -920,7 +920,7 @@ static int pci_pm_resume_noirq(struct device *dev)
|
|||||||
|
|
||||||
static int pci_pm_resume_early(struct device *dev)
|
static int pci_pm_resume_early(struct device *dev)
|
||||||
{
|
{
|
||||||
if (dev_pm_may_skip_resume(dev))
|
if (dev_pm_skip_resume(dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return pm_generic_resume_early(dev);
|
return pm_generic_resume_early(dev);
|
||||||
|
@ -758,7 +758,7 @@ 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 bool dev_pm_may_skip_resume(struct device *dev);
|
extern bool dev_pm_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);
|
||||||
|
|
||||||
#else /* !CONFIG_PM_SLEEP */
|
#else /* !CONFIG_PM_SLEEP */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user