diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/tablet/aiptek.c | 5 |
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 | |||
375 | { | 375 | { |
376 | const struct aiptek_map *p; | 376 | const struct aiptek_map *p; |
377 | 377 | ||
378 | if (str[count - 1] == '\n') | ||
379 | count--; | ||
380 | |||
378 | for (p = map; p->string; p++) | 381 | for (p = map; p->string; p++) |
379 | if (!strncmp(str, p->string, count)) | 382 | if (!strncmp(str, p->string, count)) |
380 | return p->value; | 383 | return p->value; |
381 | 384 | ||
382 | return AIPTEK_INVALID_VALUE; | 385 | return AIPTEK_INVALID_VALUE; |