diff mbox

[05/12] fujitsu-laptop: fix tests of acpi_evaluate_integer()

Message ID 200911250629.nAP6TL2u009406@turbo.physics.adelaide.edu.au (mailing list archive)
State RFC, archived
Headers show

Commit Message

Jonathan Woithe Nov. 25, 2009, 6:29 a.m. UTC
None
diff mbox

Patch

diff -puN drivers/platform/x86/fujitsu-laptop.c~fujitsu-laptop-fix-tests-of-acpi_evaluate_integer-return drivers/platform/x86/fujitsu-laptop.c
--- a/drivers/platform/x86/fujitsu-laptop.c~fujitsu-laptop-fix-tests-of-acpi_evaluate_integer-return
+++ a/drivers/platform/x86/fujitsu-laptop.c
@@ -376,7 +376,7 @@  static int get_lcd_level(void)
 
 	status =
 	    acpi_evaluate_integer(fujitsu->acpi_handle, "GBLL", NULL, &state);
-	if (status < 0)
-		return status;
+	if (ACPI_FAILURE(status))
+		return -status;
 
      fujitsu->brightness_level = state & 0x0fffffff;
@@ -398,7 +398,7 @@  static int get_max_brightness(void)
 
	status =
	    acpi_evaluate_integer(fujitsu->acpi_handle, "RBLL", NULL, &state);
-	if (status < 0)
-		return status;
+	if (ACPI_FAILURE(status))
+		return -status;
 
 	fujitsu->max_brightness = state;