patch-2.4.23 linux-2.4.23/drivers/acpi/button.c

Next file: linux-2.4.23/drivers/acpi/dispatcher/dsfield.c
Previous file: linux-2.4.23/drivers/acpi/bus.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/acpi/button.c linux-2.4.23/drivers/acpi/button.c
@@ -85,7 +85,7 @@
 
 	ACPI_FUNCTION_TRACE("acpi_button_read_info");
 
-	if (!button || !button->device)
+	if (!button || !button->device || (off != 0))
 		goto end;
 
 	p += sprintf(p, "type:                    %s\n", 
@@ -119,7 +119,7 @@
 
 	ACPI_FUNCTION_TRACE("acpi_button_lid_read_state");
 
-	if (!button || !button->device)
+	if (!button || !button->device || (off != 0))
 		goto end;
 
 	status=acpi_evaluate_integer(button->handle,"_LID",NULL,&state);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)