LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] fix the toshiba_acpi write_lcd return value 
@ 2007-01-04 21:07 Matthijs van Otterdijk
  0 siblings, 0 replies; only message in thread
From: Matthijs van Otterdijk @ 2007-01-04 21:07 UTC (permalink / raw)
  To: hmacht; +Cc: len.brown, linux-kernel, linux-acpi

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-04 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-04 21:07 [PATCH] fix the toshiba_acpi write_lcd return value Matthijs van Otterdijk

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).