[<prev] [next>] [day] [month] [year] [list]
Message-ID: <459D6CA2.8000703@gmail.com>
Date: Thu, 04 Jan 2007 22:07:46 +0100
From: Matthijs van Otterdijk <thotter@...il.com>
To: hmacht@...e.de
CC: len.brown@...el.com, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org
Subject: [PATCH] fix the toshiba_acpi write_lcd return value
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@...il.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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists