Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757913AbYAAXlM (ORCPT ); Tue, 1 Jan 2008 18:41:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755057AbYAAXkw (ORCPT ); Tue, 1 Jan 2008 18:40:52 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:38092 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754936AbYAAXkv (ORCPT ); Tue, 1 Jan 2008 18:40:51 -0500 From: "Rafael J. Wysocki" To: pm list Subject: [PATCH 4/4] PM: Do not destroy/create devices while suspended in cpuid.c Date: Wed, 2 Jan 2008 00:42:11 +0100 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: ACPI Devel Maling List , Alan Stern , Andrew Morton , Len Brown , LKML , Pavel Machek , Ingo Molnar , Greg KH References: <200801020032.45529.rjw@sisk.pl> In-Reply-To: <200801020032.45529.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801020042.12466.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1314 Lines: 40 From: Rafael J. Wysocki The cpuid driver should not attempt to destroy/create a device while suspended, unless this device corresponds to a nonboot CPU that failed to go online during a resume, in which case the PM core should be asked to remove it. Signed-off-by: Rafael J. Wysocki --- arch/x86/kernel/cpuid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6/arch/x86/kernel/cpuid.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/cpuid.c +++ linux-2.6/arch/x86/kernel/cpuid.c @@ -157,15 +157,15 @@ static int __cpuinit cpuid_class_cpu_cal switch (action) { case CPU_UP_PREPARE: - case CPU_UP_PREPARE_FROZEN: err = cpuid_device_create(cpu); break; case CPU_UP_CANCELED: - case CPU_UP_CANCELED_FROZEN: case CPU_DEAD: - case CPU_DEAD_FROZEN: cpuid_device_destroy(cpu); break; + case CPU_UP_CANCELED_FROZEN: + destroy_suspended_device(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); + break; } return err ? NOTIFY_BAD : NOTIFY_OK; } -- 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/