Commit a8eecad5 authored by Ashvini Varatharaj's avatar Ashvini Varatharaj Committed by Greg Kroah-Hartman

Staging: speakup: replacing simple_strtoul with kstrtoul

Fix checkpatch warning: WARNING: simple_strtoul is obsolete, use
kstrtoul instead
Signed-off-by: default avatarAshvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b7e7631
...@@ -616,7 +616,7 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr, ...@@ -616,7 +616,7 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
int len; int len;
char *cp; char *cp;
struct var_t *var_data; struct var_t *var_data;
int value; long value;
unsigned long flags; unsigned long flags;
param = spk_var_header_by_name(attr->attr.name); param = spk_var_header_by_name(attr->attr.name);
...@@ -638,8 +638,10 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr, ...@@ -638,8 +638,10 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
len = E_INC; len = E_INC;
else else
len = E_SET; len = E_SET;
value = simple_strtol(cp, NULL, 10); if (kstrtol(cp, 10, &value) == 0)
ret = spk_set_num_var(value, param, len); ret = spk_set_num_var(value, param, len);
else
pr_warn("overflow or parsing error has occured");
if (ret == -ERANGE) { if (ret == -ERANGE) {
var_data = param->data; var_data = param->data;
pr_warn("value for %s out of range, expect %d to %d\n", pr_warn("value for %s out of range, expect %d to %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment