From patchwork Tue Dec 15 14:01:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 67637 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBFE3p6i001539 for ; Tue, 15 Dec 2009 14:03:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754004AbZLOODv (ORCPT ); Tue, 15 Dec 2009 09:03:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760248AbZLOODv (ORCPT ); Tue, 15 Dec 2009 09:03:51 -0500 Received: from mga09.intel.com ([134.134.136.24]:24706 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754004AbZLOODu (ORCPT ); Tue, 15 Dec 2009 09:03:50 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 15 Dec 2009 06:02:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,400,1257148800"; d="scan'208";a="476258956" Received: from yakui_zhao.sh.intel.com (HELO localhost.localdomain) ([10.239.13.17]) by orsmga002.jf.intel.com with ESMTP; 15 Dec 2009 06:03:36 -0800 From: yakui.zhao@intel.com To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, Zhao Yakui Subject: [PATCH] acpi: Use the return result of ACPI lid notifier chain correctly Date: Tue, 15 Dec 2009 22:01:57 +0800 Message-Id: <1260885717-16098-1-git-send-email-yakui.zhao@intel.com> X-Mailer: git-send-email 1.5.4.5 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 0c9c6a9..8a95e83 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -282,6 +282,13 @@ static int acpi_lid_send_state(struct acpi_device *device) if (ret == NOTIFY_DONE) ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device); + if (ret == NOTIFY_DONE || ret == NOTIFY_OK) { + /* + * It is also regarded as success if the notifier_chain + * returns NOTIFY_OK or NOTIFY_DONE. + */ + ret = 0; + } return ret; }