diff options
author | Danny Baumann <dannybaumann@web.de> | 2007-11-02 08:47:53 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-11-19 01:55:13 -0500 |
commit | c88c5786d3df51ccfa4e2d111fc9c8fc0f5b2797 (patch) | |
tree | f3052d57cb9461efc13563f40b54da0401142b05 /drivers/acpi/video.c | |
parent | a4f0c2767e9c55123d7dad7176554e9d6e6056bc (diff) |
ACPI: Video: Increase buffer size for writes to brightness proc file.
In order to be able to write the value "100"
to /proc/acpi/video/.../brightness, we have to allocate 5 bytes:
4 characters will be written (1, 0, 0 plus null byte),
and 1 byte should be buffer for a terminating NULL character.
http://bugzilla.kernel.org/show_bug.cgi?id=9278
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index dce0a6e47f5a..44a0d9ba9bd6 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -897,7 +897,7 @@ acpi_video_device_write_brightness(struct file *file, | |||
897 | { | 897 | { |
898 | struct seq_file *m = file->private_data; | 898 | struct seq_file *m = file->private_data; |
899 | struct acpi_video_device *dev = m->private; | 899 | struct acpi_video_device *dev = m->private; |
900 | char str[4] = { 0 }; | 900 | char str[5] = { 0 }; |
901 | unsigned int level = 0; | 901 | unsigned int level = 0; |
902 | int i; | 902 | int i; |
903 | 903 | ||