lkml.org 
[lkml]   [2010]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 1/4] PM: Use a different list of devices for each stage of device suspend
On Mon, 13 Dec 2010, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> Instead of keeping all devices in the same list during system suspend
> and resume, regardless of what suspend-resume callbacks have been
> executed for them already, use separate lists of devices that have
> had their ->prepare(), ->suspend() and ->suspend_noirq() callbacks
> executed. This will allow us to simplify the core device suspend and
> resume routines.

Okay in principle. But there's one mistake...

> @@ -699,8 +693,8 @@ static void dpm_complete(pm_message_t st
> INIT_LIST_HEAD(&list);
> mutex_lock(&dpm_list_mtx);
> transition_started = false;
> - while (!list_empty(&dpm_list)) {
> - struct device *dev = to_device(dpm_list.prev);
> + while (!list_empty(&dpm_prepared_list)) {
> + struct device *dev = to_device(dpm_prepared_list.prev);
>
> get_device(dev);
> if (dev->power.status > DPM_ON) {

The parts about getting rid of "list" and putting dev back onto
dpm_list got left out.

Alan Stern



\
 
 \ /
  Last update: 2010-12-13 04:43    [W:0.209 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site