staging: line6: Convert simple_strtol to strict_strtol in toneport.c

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Shawn Bohrer 2009-11-15 22:17:59 -06:00 committed by Greg Kroah-Hartman
parent 63a4a8bad9
commit bb950a169d
1 changed files with 16 additions and 4 deletions

View File

@ -96,8 +96,14 @@ static ssize_t toneport_set_led_red(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
char *c;
led_red = simple_strtol(buf, &c, 10);
int retval;
long value;
retval = strict_strtol(buf, 10, &value);
if (retval)
return retval;
led_red = value;
toneport_update_led(dev);
return count;
}
@ -106,8 +112,14 @@ static ssize_t toneport_set_led_green(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
char *c;
led_green = simple_strtol(buf, &c, 10);
int retval;
long value;
retval = strict_strtol(buf, 10, &value);
if (retval)
return retval;
led_green = value;
toneport_update_led(dev);
return count;
}