summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_hwmon.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-02-05 02:02:59 (GMT)
committerBen Skeggs <bskeggs@redhat.com>2014-03-26 03:59:31 (GMT)
commit0ac4e3a58d58e33b2353b3e187c88b9485f26591 (patch)
tree906e79fdc9c554c09d39bba87dd0132aa5d85fb5 /drivers/gpu/drm/nouveau/nouveau_hwmon.c
parentaa34efeddb6426c2d03214e65d6f31fbf7d413da (diff)
downloadlinux-0ac4e3a58d58e33b2353b3e187c88b9485f26591.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_hwmon.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_hwmon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index 5e4ab58..19fd767 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -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)