From: Roel Kluin <roel.kluin@gmail.com>
To: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>,
linux-acpi@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] fujitsu-laptop: Fix tests of acpi_evaluate_integer() return
Date: Mon, 12 Oct 2009 13:14:32 +0200 [thread overview]
Message-ID: <4AD30F98.4010904@gmail.com> (raw)
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;
next reply other threads:[~2009-10-12 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 11:14 Roel Kluin [this message]
2009-10-12 11:25 ` [PATCH] fujitsu-laptop: Fix tests of acpi_evaluate_integer() return Jonathan Woithe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD30F98.4010904@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jwoithe@physics.adelaide.edu.au \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.