PM: sleep: Drop dpm_noirq_begin() and dpm_noirq_end()
Note that after previous changes dpm_noirq_begin() and dpm_noirq_end() each have only one caller, so move the code from them to their respective callers and drop them. Also note that dpm_noirq_resume_devices() and dpm_noirq_suspend_devices() need not be exported any more, so make them both static. This change is not expected to alter functionality. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
8eb0fd3b55
commit
b605c44c30
|
@ -716,7 +716,7 @@ static void async_resume_noirq(void *data, async_cookie_t cookie)
|
|||
put_device(dev);
|
||||
}
|
||||
|
||||
void dpm_noirq_resume_devices(pm_message_t state)
|
||||
static void dpm_noirq_resume_devices(pm_message_t state)
|
||||
{
|
||||
struct device *dev;
|
||||
ktime_t starttime = ktime_get();
|
||||
|
@ -760,13 +760,6 @@ void dpm_noirq_resume_devices(pm_message_t state)
|
|||
trace_suspend_resume(TPS("dpm_resume_noirq"), state.event, false);
|
||||
}
|
||||
|
||||
void dpm_noirq_end(void)
|
||||
{
|
||||
resume_device_irqs();
|
||||
device_wakeup_disarm_wake_irqs();
|
||||
cpuidle_resume();
|
||||
}
|
||||
|
||||
/**
|
||||
* dpm_resume_noirq - Execute "noirq resume" callbacks for all devices.
|
||||
* @state: PM transition of the system being carried out.
|
||||
|
@ -777,7 +770,11 @@ void dpm_noirq_end(void)
|
|||
void dpm_resume_noirq(pm_message_t state)
|
||||
{
|
||||
dpm_noirq_resume_devices(state);
|
||||
dpm_noirq_end();
|
||||
|
||||
resume_device_irqs();
|
||||
device_wakeup_disarm_wake_irqs();
|
||||
|
||||
cpuidle_resume();
|
||||
}
|
||||
|
||||
static pm_callback_t dpm_subsys_resume_early_cb(struct device *dev,
|
||||
|
@ -1357,14 +1354,7 @@ static int device_suspend_noirq(struct device *dev)
|
|||
return __device_suspend_noirq(dev, pm_transition, false);
|
||||
}
|
||||
|
||||
void dpm_noirq_begin(void)
|
||||
{
|
||||
cpuidle_pause();
|
||||
device_wakeup_arm_wake_irqs();
|
||||
suspend_device_irqs();
|
||||
}
|
||||
|
||||
int dpm_noirq_suspend_devices(pm_message_t state)
|
||||
static int dpm_noirq_suspend_devices(pm_message_t state)
|
||||
{
|
||||
ktime_t starttime = ktime_get();
|
||||
int error = 0;
|
||||
|
@ -1421,7 +1411,11 @@ int dpm_suspend_noirq(pm_message_t state)
|
|||
{
|
||||
int ret;
|
||||
|
||||
dpm_noirq_begin();
|
||||
cpuidle_pause();
|
||||
|
||||
device_wakeup_arm_wake_irqs();
|
||||
suspend_device_irqs();
|
||||
|
||||
ret = dpm_noirq_suspend_devices(state);
|
||||
if (ret)
|
||||
dpm_resume_noirq(resume_event(state));
|
||||
|
|
|
@ -712,8 +712,6 @@ struct dev_pm_domain {
|
|||
extern void device_pm_lock(void);
|
||||
extern void dpm_resume_start(pm_message_t state);
|
||||
extern void dpm_resume_end(pm_message_t state);
|
||||
extern void dpm_noirq_resume_devices(pm_message_t state);
|
||||
extern void dpm_noirq_end(void);
|
||||
extern void dpm_resume_noirq(pm_message_t state);
|
||||
extern void dpm_resume_early(pm_message_t state);
|
||||
extern void dpm_resume(pm_message_t state);
|
||||
|
@ -722,8 +720,6 @@ extern void dpm_complete(pm_message_t state);
|
|||
extern void device_pm_unlock(void);
|
||||
extern int dpm_suspend_end(pm_message_t state);
|
||||
extern int dpm_suspend_start(pm_message_t state);
|
||||
extern void dpm_noirq_begin(void);
|
||||
extern int dpm_noirq_suspend_devices(pm_message_t state);
|
||||
extern int dpm_suspend_noirq(pm_message_t state);
|
||||
extern int dpm_suspend_late(pm_message_t state);
|
||||
extern int dpm_suspend(pm_message_t state);
|
||||
|
|
Loading…
Reference in New Issue