From patchwork Wed Jul 7 22:44:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 110749 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o67MlnUl010484 for ; Wed, 7 Jul 2010 22:47:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757102Ab0GGWrt (ORCPT ); Wed, 7 Jul 2010 18:47:49 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:32919 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758123Ab0GGWrs (ORCPT ); Wed, 7 Jul 2010 18:47:48 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id C4E9218B601; Thu, 8 Jul 2010 00:32:07 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00737-06; Thu, 8 Jul 2010 00:31:51 +0200 (CEST) Received: from ferrari.localnet (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 2305718B6D2; Thu, 8 Jul 2010 00:31:51 +0200 (CEST) From: "Rafael J. Wysocki" To: Len Brown Subject: [Resend][PATCH 3/4] ACPI / ACPICA: Simplify acpi_ev_initialize_gpe_block() Date: Thu, 8 Jul 2010 00:44:42 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.35-rc4; KDE/4.4.4; x86_64; ; ) Cc: ACPI Devel Maling List , Matthew Garrett , Len Brown , linux-pm@lists.linux-foundation.org, Lin Ming , "Moore, Robert" References: <201007080041.38627.rjw@sisk.pl> In-Reply-To: <201007080041.38627.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201007080044.42928.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 07 Jul 2010 22:47:50 +0000 (UTC) Index: linux-2.6/drivers/acpi/acpica/evgpeblk.c =================================================================== --- linux-2.6.orig/drivers/acpi/acpica/evgpeblk.c +++ linux-2.6/drivers/acpi/acpica/evgpeblk.c @@ -472,26 +472,21 @@ acpi_ev_initialize_gpe_block(struct acpi gpe_event_info = &gpe_block->event_info[gpe_index]; gpe_number = gpe_index + gpe_block->block_base_number; - /* - * If the GPE has already been enabled for runtime - * signaling, make sure it remains enabled, but do not - * increment its reference counter. - */ - if (gpe_event_info->runtime_count) { - status = acpi_ev_enable_gpe(gpe_event_info); - goto enabled; - } - /* Ignore GPEs that have no corresponding _Lxx/_Exx method */ if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_METHOD)) { continue; } - /* Enable this GPE */ + /* + * If the GPE has already been enabled for runtime + * signaling, make sure it remains enabled, but do not + * increment its reference counter. + */ + status = gpe_event_info->runtime_count ? + acpi_ev_enable_gpe(gpe_event_info) : + acpi_enable_gpe(gpe_device, gpe_number); - status = acpi_enable_gpe(gpe_device, gpe_number); - enabled: if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Could not enable GPE 0x%02X",