提交 0112db36 编写于 作者: R Rene van Paassen 提交者: Dmitry Torokhov

Input: aiptek - tolerate newlines in sysfs files

Now echo "some value" > /sys/......./somefile is also acceptable.
Signed-off-by: NRene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 b3b6cf1d
......@@ -375,6 +375,9 @@ static int map_str_to_val(const struct aiptek_map *map, const char *str, size_t
{
const struct aiptek_map *p;
if (str[count - 1] == '\n')
count--;
for (p = map; p->string; p++)
if (!strncmp(str, p->string, count))
return p->value;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册