mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
drm/nouveau/hwmon: replace strict_strtol() with kstrtol()
The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
aa34efeddb
commit
0ac4e3a58d
1 changed files with 3 additions and 2 deletions
|
@ -383,8 +383,9 @@ nouveau_hwmon_set_pwm1_enable(struct device *d, struct device_attribute *a,
|
|||
long value;
|
||||
int ret;
|
||||
|
||||
if (strict_strtol(buf, 10, &value) == -EINVAL)
|
||||
return -EINVAL;
|
||||
ret = kstrtol(buf, 10, &value);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = therm->attr_set(therm, NOUVEAU_THERM_ATTR_FAN_MODE, value);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in a new issue