projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a28395
)
fujitu-laptop: fix tests of acpi_evaluate_integer() return value
author
Jonathan Woithe
<
[email protected]
>
Tue, 22 Dec 2009 22:49:42 +0000
(09:19 +1030)
committer
Len Brown
<
[email protected]
>
Wed, 23 Dec 2009 07:24:32 +0000
(
02:24
-0500)
Fix tests on return value from acpi_evaluate_integer(). Based on a patch by
Roel Kluin <
[email protected]
> and incorporating suggestions from Len
Brown <
[email protected]
>.
Signed-off-by: Roel Kluin <
[email protected]
>
Signed-off-by: Jonathan Woithe <
[email protected]
>
Signed-off-by: Len Brown <
[email protected]
>
drivers/platform/x86/fujitsu-laptop.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/fujitsu-laptop.c
b/drivers/platform/x86/fujitsu-laptop.c
index bcd4ba8be7db4781699d7d862d81d2372160e368..3c2d0384b43b301441916943e209ccc14b11612e 100644
(file)
--- 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;