提交 c88c5786 编写于 作者: D Danny Baumann 提交者: Len Brown

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=9278Signed-off-by: NDanny Baumann <dannybaumann@web.de>
Acked-by: NZhang Rui <rui.zhang@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 a4f0c276
......@@ -897,7 +897,7 @@ acpi_video_device_write_brightness(struct file *file,
{
struct seq_file *m = file->private_data;
struct acpi_video_device *dev = m->private;
char str[4] = { 0 };
char str[5] = { 0 };
unsigned int level = 0;
int i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册