* [PATCH] fujitus-laptop: fix tests of acpi_evaluate_integer() return value
@ 2009-12-22 22:49 Jonathan Woithe
2009-12-23 7:24 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Woithe @ 2009-12-22 22:49 UTC (permalink / raw)
To: linux-acpi, roel.kluin, lenb; +Cc: Jonathan Woithe
From: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
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>
--- a/drivers/platform/x86/fujitsu-laptop.c 2009-12-23 09:11:23.599497331 +1030
+++ b/drivers/platform/x86/fujitsu-laptop.c 2009-12-23 09:12:12.754405304 +1030
@@ -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fujitus-laptop: fix tests of acpi_evaluate_integer() return value
2009-12-22 22:49 [PATCH] fujitus-laptop: fix tests of acpi_evaluate_integer() return value Jonathan Woithe
@ 2009-12-23 7:24 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2009-12-23 7:24 UTC (permalink / raw)
To: Jonathan Woithe; +Cc: linux-acpi, roel.kluin
applied
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-23 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 22:49 [PATCH] fujitus-laptop: fix tests of acpi_evaluate_integer() return value Jonathan Woithe
2009-12-23 7:24 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox