From: Matthijs van Otterdijk <thotter@gmail.com>
To: hmacht@suse.de
Cc: len.brown@intel.com, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org
Subject: [PATCH] fix the toshiba_acpi write_lcd return value
Date: Thu, 04 Jan 2007 22:07:46 +0100 [thread overview]
Message-ID: <459D6CA2.8000703@gmail.com> (raw)
the write_lcd function in toshiba_acpi returns 0 on success since the big ACPI
patch merged in 2.6.20-rc2. It should return count.
Signed-off-by: Matthijs van Otterdijk <thotter@gmail.com>
---
drivers/acpi/toshiba_acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -up a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
--- a/drivers/acpi/toshiba_acpi.c 2007-01-04 18:41:03.000000000 +0100
+++ b/drivers/acpi/toshiba_acpi.c 2007-01-04 19:36:32.000000000 +0100
@@ -321,11 +321,11 @@ static int set_lcd_status(struct backlig
static unsigned long write_lcd(const char *buffer, unsigned long count)
{
int value;
- int ret = count;
+ int ret;
if (sscanf(buffer, " brightness : %i", &value) == 1 &&
value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS)
- ret = set_lcd(value);
+ ret = (ret = set_lcd(value)) == 0 ? count : ret;
else
ret = -EINVAL;
return ret;
reply other threads:[~2007-01-04 21:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=459D6CA2.8000703@gmail.com \
--to=thotter@gmail.com \
--cc=hmacht@suse.de \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).