diff mbox

acpi: Use the return result of ACPI lid notifier chain correctly

Message ID 1260885717-16098-1-git-send-email-yakui.zhao@intel.com (mailing list archive)
State RFC, archived
Headers show

Commit Message

Zhao, Yakui Dec. 15, 2009, 2:01 p.m. UTC
None
diff mbox

Patch

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;
 }