summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJonathan Woithe2009-12-22 23:49:42 +0100
committerLen Brown2009-12-23 08:24:32 +0100
commit3b1c37cab3765b87efbd4ed40301ceaf72b9f5c2 (patch)
tree8d0c96819aa3c6b109ba6ccc2a40dfd2a9a1ffd0 /drivers
parentarch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: avoid cross-CPU interrupts by usi... (diff)
downloadkernel-qcow2-linux-3b1c37cab3765b87efbd4ed40301ceaf72b9f5c2.tar.gz
kernel-qcow2-linux-3b1c37cab3765b87efbd4ed40301ceaf72b9f5c2.tar.xz
kernel-qcow2-linux-3b1c37cab3765b87efbd4ed40301ceaf72b9f5c2.zip
fujitu-laptop: fix tests of acpi_evaluate_integer() return value
Fix tests on return value from acpi_evaluate_integer(). Based on a patch by Roel Kluin <roel.kluin@gmail.com> and incorporating suggestions from Len Brown <lenb@kernel.org>. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index bcd4ba8be7db..3c2d0384b43b 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -376,8 +376,8 @@ 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 0;
fujitsu->brightness_level = state & 0x0fffffff;
@@ -398,8 +398,8 @@ 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 -1;
fujitsu->max_brightness = state;