From: Mattia Dongili <malattia@linux.it>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, Mattia Dongili <malattia@linux.it>
Subject: [PATCH 5/6] sony-laptop: fix bogus error message display on resume
Date: Sun, 12 Apr 2009 20:26:30 +0900 [thread overview]
Message-ID: <1239535591-15514-6-git-send-email-malattia@linux.it> (raw)
In-Reply-To: <1239535591-15514-5-git-send-email-malattia@linux.it>
sony_backlight_update_status returns 0 on success -1 on failure (i.e.: the
return value from acpi_callsetfunc. The return value in the resume path
was broken and thus always displaying a bogus warning about not being able
to restore the brightness level.
Signed-off-by: Mattia Dongili <malattia@linux.it>
---
drivers/platform/x86/sony-laptop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index ddbd86b..419873a 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1041,7 +1041,7 @@ static int sony_nc_resume(struct acpi_device *device)
/* set the last requested brightness level */
if (sony_backlight_device &&
- !sony_backlight_update_status(sony_backlight_device))
+ sony_backlight_update_status(sony_backlight_device) < 0)
printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
return 0;
--
1.6.2.2
next prev parent reply other threads:[~2009-04-12 11:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-12 11:26 [PATCH 0/6] sony-laptop fixes for 2.6.30-rc2 Mattia Dongili
2009-04-12 11:26 ` [PATCH 1/6] sony-laptop: Duplicate SNC 127 Event Fix Mattia Dongili
2009-04-12 11:26 ` [PATCH 2/6] sony-laptop: SNC 127 Initialization Fix Mattia Dongili
2009-04-12 11:26 ` [PATCH 3/6] sony-laptop: SNC input event 38 fix Mattia Dongili
2009-04-12 11:26 ` [PATCH 4/6] ec.c: Fix ACPI EC resume non-query interrupt message Mattia Dongili
2009-04-12 11:26 ` Mattia Dongili [this message]
2009-04-12 11:26 ` [PATCH 6/6] sony-laptop: always try to unblock rfkill on load Mattia Dongili
2009-04-13 15:46 ` Matthew Garrett
2009-04-18 5:16 ` [PATCH 0/6] sony-laptop fixes for 2.6.30-rc2 Len Brown
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=1239535591-15514-6-git-send-email-malattia@linux.it \
--to=malattia@linux.it \
--cc=lenb@kernel.org \
--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.