Commit 0112db36 authored by Rene van Paassen's avatar Rene van Paassen Committed by Dmitry Torokhov
Browse files

Input: aiptek - tolerate newlines in sysfs files



Now echo "some value" > /sys/......./somefile is also acceptable.

Signed-off-by: default avatarRene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent b3b6cf1d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;