From patchwork Thu Dec 10 23:51:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Torvalds X-Patchwork-Id: 66376 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBANpeXn018954 for ; Thu, 10 Dec 2009 23:51:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753803AbZLJXvc (ORCPT ); Thu, 10 Dec 2009 18:51:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755908AbZLJXvc (ORCPT ); Thu, 10 Dec 2009 18:51:32 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:60786 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753803AbZLJXvb (ORCPT ); Thu, 10 Dec 2009 18:51:31 -0500 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id nBANpGGx027797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Dec 2009 15:51:17 -0800 Received: from localhost (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id nBANpFTc002918; Thu, 10 Dec 2009 15:51:15 -0800 Date: Thu, 10 Dec 2009 15:51:15 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Alan Stern cc: "Rafael J. Wysocki" , Zhang Rui , LKML , ACPI Devel Maling List , pm list Subject: Re: Async suspend-resume patch w/ completions (was: Re: Async suspend-resume patch w/ rwsems) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 X-Spam-Status: No, hits=-3.451 required=5 tests=AWL,BAYES_00 X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 8aa2443..f2bb493 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -687,6 +687,7 @@ static int dpm_suspend(pm_message_t state) struct device *dev = to_device(dpm_list.prev); get_device(dev); + list_move(&dev->power.entry, &list); mutex_unlock(&dpm_list_mtx); error = device_suspend(dev, state); @@ -698,8 +699,6 @@ static int dpm_suspend(pm_message_t state) break; } dev->power.status = DPM_OFF; - if (!list_empty(&dev->power.entry)) - list_move(&dev->power.entry, &list); put_device(dev); } list_splice(&list, dpm_list.prev);