summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorRene van Paassen <rene.vanpaassen@gmail.com>2007-05-21 06:32:12 +0200
committerDmitry Torokhov <dtor@insightbb.com>2007-07-10 06:35:17 +0200
commit0112db36ef95e5632db071297f7df130725c47b9 (patch)
tree1ce114a268211b98df62b4703c628c5823476b83 /drivers/input/tablet
parentInput: aiptek - correct the tool switching code (diff)
downloadlinux-0112db36ef95e5632db071297f7df130725c47b9.tar.xz
linux-0112db36ef95e5632db071297f7df130725c47b9.zip
Input: aiptek - tolerate newlines in sysfs files
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>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/aiptek.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 0c78dc4ed5cf..54c8d6f49833 100644
--- 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;