From patchwork Thu Dec 12 10:08:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 3330971 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 536DA9F37A for ; Thu, 12 Dec 2013 10:09:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEB0720780 for ; Thu, 12 Dec 2013 10:08:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CF2E20748 for ; Thu, 12 Dec 2013 10:08:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751482Ab3LLKIm (ORCPT ); Thu, 12 Dec 2013 05:08:42 -0500 Received: from mga03.intel.com ([143.182.124.21]:35832 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120Ab3LLKIk (ORCPT ); Thu, 12 Dec 2013 05:08:40 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 12 Dec 2013 02:08:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,877,1378882800"; d="scan'208";a="442994504" Received: from tlan1-mobl2.sh.intel.com (HELO localhost) ([10.239.193.176]) by fmsmga001.fm.intel.com with ESMTP; 12 Dec 2013 02:08:37 -0800 From: Lan Tianyu To: lenb@kernel.org, rjw@rjwysocki.net Cc: Lan Tianyu , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI/EC: disable gpe before removing gpe handler Date: Thu, 12 Dec 2013 18:08:52 +0800 Message-Id: <1386842932-8057-1-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.8.2.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adjust the order of disabling gpe and removing gpe handler to make sure no gpe after removing gpe handler. Signed-off-by: Lan Tianyu --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index ff40120..172a124 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -778,9 +778,9 @@ static int ec_install_handlers(struct acpi_ec *ec) pr_err("Fail in evaluating the _REG object" " of EC device. Broken bios is suspected.\n"); } else { + acpi_disable_gpe(NULL, ec->gpe); acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler); - acpi_disable_gpe(NULL, ec->gpe); return -ENODEV; } }