Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762888AbYBVAr6 (ORCPT ); Thu, 21 Feb 2008 19:47:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756523AbYBVArr (ORCPT ); Thu, 21 Feb 2008 19:47:47 -0500 Received: from smtp1.linux-foundation.org ([207.189.120.13]:45536 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757356AbYBVArq (ORCPT ); Thu, 21 Feb 2008 19:47:46 -0500 Date: Thu, 21 Feb 2008 16:46:33 -0800 (PST) From: Linus Torvalds To: "Rafael J. Wysocki" cc: Jeff Chua , Jesse Barnes , Romano Giannetti , suspend-devel List , Dave Airlie , Greg KH , lkml , linux-acpi@vger.kernel.org Subject: Re: [Suspend-devel] 2.6.25-rc2 System no longer powers off aftersuspend-to-disk. Screen becomes green. In-Reply-To: <200802220131.09525.rjw@sisk.pl> Message-ID: References: <200802211302.27002.jesse.barnes@intel.com> <200802220131.09525.rjw@sisk.pl> User-Agent: Alpine 1.00 (LFD 882 2007-12-20) 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: 960 Lines: 27 On Fri, 22 Feb 2008, Rafael J. Wysocki wrote: > > - if (state.event == PM_EVENT_SUSPEND) { > + if (state.event == PM_EVENT_SUSPEND && !in_hibernation_power_off()) { I don't understand why hibernation just doesn't use a PM_EVENT_HIBERNATE, and be done with it? Why should it be called PM_EVENT_SUSPEND when it isn't? Adding some external global variables is absolutely the wrong way to fix this. It's not even like there are very many drivers who actually care about "state.event" anyway: a 'git grep' returns just 35 users in the whole tree, so if this was done this ugly way just to avoid double-chcking the other cases that compare against PM_EVENT_SUSPEND, then it really wasn't worth it. Linus -- 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/