* [PATCH] fujitsu-laptop: Fix tests of acpi_evaluate_integer() return
@ 2009-10-12 11:14 Roel Kluin
2009-10-12 11:25 ` Jonathan Woithe
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-10-12 11:14 UTC (permalink / raw)
To: Jonathan Woithe, linux-acpi, Andrew Morton
The wrong test was used acpi_status status is unsigned.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index f35aee5..e3c21ee 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/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)
+ 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)
+ if (ACPI_FAILURE(status))
return status;
fujitsu->max_brightness = state;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fujitsu-laptop: Fix tests of acpi_evaluate_integer() return
2009-10-12 11:14 [PATCH] fujitsu-laptop: Fix tests of acpi_evaluate_integer() return Roel Kluin
@ 2009-10-12 11:25 ` Jonathan Woithe
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Woithe @ 2009-10-12 11:25 UTC (permalink / raw)
To: Roel Kluin; +Cc: Jonathan Woithe, linux-acpi, Andrew Morton
> The wrong test was used acpi_status status is unsigned.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> index f35aee5..e3c21ee 100644
> --- a/drivers/platform/x86/fujitsu-laptop.c
> +++ b/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)
> + 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)
> + if (ACPI_FAILURE(status))
> return status;
>
> fujitsu->max_brightness = state;
Thanks Roel. Looks perfectly reasonable to me.
Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-12 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12 11:14 [PATCH] fujitsu-laptop: Fix tests of acpi_evaluate_integer() return Roel Kluin
2009-10-12 11:25 ` Jonathan Woithe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.