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;
}
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;
}