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

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

diff -urN linux-2.4.22/drivers/acpi/battery.c linux-2.4.23/drivers/acpi/battery.c
@@ -348,7 +348,7 @@
 
 	ACPI_FUNCTION_TRACE("acpi_battery_read_info");
 
-	if (!battery)
+	if (!battery || (off != 0))
 		goto end;
 
 	if (battery->flags.present)
@@ -447,7 +447,7 @@
 
 	ACPI_FUNCTION_TRACE("acpi_battery_read_state");
 
-	if (!battery)
+	if (!battery || (off != 0))
 		goto end;
 
 	if (battery->flags.present)
@@ -531,7 +531,7 @@
 
 	ACPI_FUNCTION_TRACE("acpi_battery_read_alarm");
 
-	if (!battery)
+	if (!battery || (off != 0))
 		goto end;
 
 	if (!battery->flags.present) {

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