projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3b6cf1
)
Input: aiptek - tolerate newlines in sysfs files
author
Rene van Paassen
<rene.vanpaassen@gmail.com>
Mon, 21 May 2007 04:32:12 +0000
(
00:32
-0400)
committer
Dmitry Torokhov
<dtor@insightbb.com>
Tue, 10 Jul 2007 04:35:17 +0000
(
00:35
-0400)
Now echo "some value" > /sys/......./somefile is also acceptable.
Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/tablet/aiptek.c
patch
|
blob
|
history
diff --git
a/drivers/input/tablet/aiptek.c
b/drivers/input/tablet/aiptek.c
index 0c78dc4ed5cf36bc860019d74be25817d1500d4c..54c8d6f498330759810b1ce25d4603974b319c59 100644
(file)
--- a/
drivers/input/tablet/aiptek.c
+++ b/
drivers/input/tablet/aiptek.c
@@
-375,8
+375,11
@@
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))
+ if (!strncmp(str, p->string, count))
return p->value;
return AIPTEK_INVALID_VALUE;