Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756718Ab0LMDkN (ORCPT ); Sun, 12 Dec 2010 22:40:13 -0500 Received: from netrider.rowland.org ([192.131.102.5]:47262 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756674Ab0LMDkM (ORCPT ); Sun, 12 Dec 2010 22:40:12 -0500 Date: Sun, 12 Dec 2010 22:40:10 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: "Rafael J. Wysocki" cc: LKML , Linus Torvalds , Linux-pm mailing list Subject: Re: [RFC][PATCH 1/4] PM: Use a different list of devices for each stage of device suspend In-Reply-To: <201012130129.55483.rjw@sisk.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 35 On Mon, 13 Dec 2010, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/