diff options
author | Matthijs van Otterdijk <thotter@gmail.com> | 2007-01-05 19:37:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-06 02:55:29 -0500 |
commit | c8af57eb76fbd70c7f5b421b065fd55d096e2bff (patch) | |
tree | cf4576b2810b1f00513aca76143d4786fc4fc4e5 /drivers/acpi/toshiba_acpi.c | |
parent | 73b8ed29ab3f6ad7204b4e61cfa87dc0c28d3019 (diff) |
[PATCH] fix the toshiba_acpi write_lcd return value
write_lcd() 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>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/acpi/toshiba_acpi.c')
-rw-r--r-- | drivers/acpi/toshiba_acpi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 88aeccbafaaf..d9b651ffcdc0 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c | |||
@@ -321,13 +321,16 @@ static int set_lcd_status(struct backlight_device *bd) | |||
321 | static unsigned long write_lcd(const char *buffer, unsigned long count) | 321 | static unsigned long write_lcd(const char *buffer, unsigned long count) |
322 | { | 322 | { |
323 | int value; | 323 | int value; |
324 | int ret = count; | 324 | int ret; |
325 | 325 | ||
326 | if (sscanf(buffer, " brightness : %i", &value) == 1 && | 326 | if (sscanf(buffer, " brightness : %i", &value) == 1 && |
327 | value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS) | 327 | value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS) { |
328 | ret = set_lcd(value); | 328 | ret = set_lcd(value); |
329 | else | 329 | if (ret == 0) |
330 | ret = count; | ||
331 | } else { | ||
330 | ret = -EINVAL; | 332 | ret = -EINVAL; |
333 | } | ||
331 | return ret; | 334 | return ret; |
332 | } | 335 | } |
333 | 336 | ||