diff options
author | Joe Rouvier <joe@rouvier.org> | 2008-08-10 06:29:25 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-09-10 18:11:57 +0200 |
commit | 160f1fef7e52e974489b3c70fbd4e094c06965c2 (patch) | |
tree | 80423a45a9a57736e6ce6351da0801e1a5b02b8c /drivers/input/mouse/logips2pp.c | |
parent | Input: appletouch - handle geyser 3/4 status bits (diff) | |
download | linux-160f1fef7e52e974489b3c70fbd4e094c06965c2.tar.xz linux-160f1fef7e52e974489b3c70fbd4e094c06965c2.zip |
Input: convert drivers to use strict_strtoul()
strict_strtoul() allows newline character at the end of the the input
string and therefore is more user-friendly.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/logips2pp.c')
-rw-r--r-- | drivers/input/mouse/logips2pp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 0c5660d28caa..390f1dbb98a4 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c @@ -157,10 +157,8 @@ static ssize_t ps2pp_attr_show_smartscroll(struct psmouse *psmouse, void *data, static ssize_t ps2pp_attr_set_smartscroll(struct psmouse *psmouse, void *data, const char *buf, size_t count) { unsigned long value; - char *rest; - value = simple_strtoul(buf, &rest, 10); - if (*rest || value > 1) + if (strict_strtoul(buf, 10, &value) || value > 1) return -EINVAL; ps2pp_set_smartscroll(psmouse, value); |