mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[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>
This commit is contained in:
parent
73b8ed29ab
commit
c8af57eb76
1 changed files with 6 additions and 3 deletions
|
@ -321,13 +321,16 @@ static int set_lcd_status(struct backlight_device *bd)
|
||||||
static unsigned long write_lcd(const char *buffer, unsigned long count)
|
static unsigned long write_lcd(const char *buffer, unsigned long count)
|
||||||
{
|
{
|
||||||
int value;
|
int value;
|
||||||
int ret = count;
|
int ret;
|
||||||
|
|
||||||
if (sscanf(buffer, " brightness : %i", &value) == 1 &&
|
if (sscanf(buffer, " brightness : %i", &value) == 1 &&
|
||||||
value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS)
|
value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS) {
|
||||||
ret = set_lcd(value);
|
ret = set_lcd(value);
|
||||||
else
|
if (ret == 0)
|
||||||
|
ret = count;
|
||||||
|
} else {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue