Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0112db36ef95e5632db071297f7df130725c47b9
Commit:     0112db36ef95e5632db071297f7df130725c47b9
Parent:     b3b6cf1d47508a04de859d357789a3fc0cf8c690
Author:     Rene van Paassen <[EMAIL PROTECTED]>
AuthorDate: Mon May 21 00:32:12 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 00:35:17 2007 -0400

    Input: aiptek - tolerate newlines in sysfs files
    
    Now echo "some value" > /sys/......./somefile is also acceptable.
    
    Signed-off-by: Rene van Paassen <[EMAIL PROTECTED]>
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
---
 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 0c78dc4..54c8d6f 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to