Skip to contentSkip to conversation

hwmon: (pmbus) Replace strict_strtol with kstrtol

PATCH In review Guenter Roeck 2 participants 2 messages Jan 16, 2012 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 hwmon: (pmbus) Replace strict_strtol with kstrtol

strict_strtol is deprecated and results in a checkpatch warning. Replace it with kstrtol.

---
 drivers/hwmon/pmbus/pmbus_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hwmon/pmbus/pmbus_core.c +1 -1
index 00460d8..b31f461 100644
@@ -781,7 +781,7 @@ static ssize_t pmbus_set_sensor(struct device *dev,
 	int ret;
 	u16 regval;
 
-	if (strict_strtol(buf, 10, &val) < 0)
+	if (kstrtol(buf, 10, &val) < 0)
 		return -EINVAL;
 
 	mutex_lock(&data->update_lock);
Signature · 7 lines
1.7.5.4


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Guenter Roeck

strict_strtol is deprecated and results in a checkpatch warning. Replace it with kstrtol.

---
 drivers/hwmon/pmbus/pmbus_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hwmon/pmbus/pmbus_core.c +0 -0
index 00460d8..b31f461 100644

drivers/hwmon/pmbus/pmbus_core.c static ssize_t pmbus_set_sensor(struct device *dev, · line 787

Quoted 8 lines
drivers/hwmon/pmbus/pmbus_core.c +1 -1
@@ -781,7 +781,7 @@ static ssize_t pmbus_set_sensor(struct device *dev,
 	int ret;
 	u16 regval;
 
-	if (strict_strtol(buf, 10, &val) < 0)
+	if (kstrtol(buf, 10, &val) < 0)
 		return -EINVAL;
 
 	mutex_lock(&data->update_lock);

Obviously correct.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors