diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2012-01-04 14:58:52 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-01-05 11:19:34 -0500 |
commit | 179c4fdb565dd2157e5dfe89318b74868e3b523d (patch) | |
tree | 66c8b705260562df090a5061af2be9c80b71cd4b /drivers/hwmon/it87.c | |
parent | 24edc0a71badc13a9574b060e6a22e78339ac7a4 (diff) |
hwmon: replaced strict_str* with kstr*
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuol
This satisfies checkpatch -f
Compile tested only: no warnings or errors given
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/it87.c')
-rw-r--r-- | drivers/hwmon/it87.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index d912649fac50..38c0b87676de 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
@@ -444,7 +444,7 @@ static ssize_t set_in_min(struct device *dev, struct device_attribute *attr, | |||
444 | struct it87_data *data = dev_get_drvdata(dev); | 444 | struct it87_data *data = dev_get_drvdata(dev); |
445 | unsigned long val; | 445 | unsigned long val; |
446 | 446 | ||
447 | if (strict_strtoul(buf, 10, &val) < 0) | 447 | if (kstrtoul(buf, 10, &val) < 0) |
448 | return -EINVAL; | 448 | return -EINVAL; |
449 | 449 | ||
450 | mutex_lock(&data->update_lock); | 450 | mutex_lock(&data->update_lock); |
@@ -463,7 +463,7 @@ static ssize_t set_in_max(struct device *dev, struct device_attribute *attr, | |||
463 | struct it87_data *data = dev_get_drvdata(dev); | 463 | struct it87_data *data = dev_get_drvdata(dev); |
464 | unsigned long val; | 464 | unsigned long val; |
465 | 465 | ||
466 | if (strict_strtoul(buf, 10, &val) < 0) | 466 | if (kstrtoul(buf, 10, &val) < 0) |
467 | return -EINVAL; | 467 | return -EINVAL; |
468 | 468 | ||
469 | mutex_lock(&data->update_lock); | 469 | mutex_lock(&data->update_lock); |
@@ -539,7 +539,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *attr, | |||
539 | struct it87_data *data = dev_get_drvdata(dev); | 539 | struct it87_data *data = dev_get_drvdata(dev); |
540 | long val; | 540 | long val; |
541 | 541 | ||
542 | if (strict_strtol(buf, 10, &val) < 0) | 542 | if (kstrtol(buf, 10, &val) < 0) |
543 | return -EINVAL; | 543 | return -EINVAL; |
544 | 544 | ||
545 | mutex_lock(&data->update_lock); | 545 | mutex_lock(&data->update_lock); |
@@ -557,7 +557,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *attr, | |||
557 | struct it87_data *data = dev_get_drvdata(dev); | 557 | struct it87_data *data = dev_get_drvdata(dev); |
558 | long val; | 558 | long val; |
559 | 559 | ||
560 | if (strict_strtol(buf, 10, &val) < 0) | 560 | if (kstrtol(buf, 10, &val) < 0) |
561 | return -EINVAL; | 561 | return -EINVAL; |
562 | 562 | ||
563 | mutex_lock(&data->update_lock); | 563 | mutex_lock(&data->update_lock); |
@@ -604,7 +604,7 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr, | |||
604 | long val; | 604 | long val; |
605 | u8 reg; | 605 | u8 reg; |
606 | 606 | ||
607 | if (strict_strtol(buf, 10, &val) < 0) | 607 | if (kstrtol(buf, 10, &val) < 0) |
608 | return -EINVAL; | 608 | return -EINVAL; |
609 | 609 | ||
610 | reg = it87_read_value(data, IT87_REG_TEMP_ENABLE); | 610 | reg = it87_read_value(data, IT87_REG_TEMP_ENABLE); |
@@ -718,7 +718,7 @@ static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, | |||
718 | long val; | 718 | long val; |
719 | u8 reg; | 719 | u8 reg; |
720 | 720 | ||
721 | if (strict_strtol(buf, 10, &val) < 0) | 721 | if (kstrtol(buf, 10, &val) < 0) |
722 | return -EINVAL; | 722 | return -EINVAL; |
723 | 723 | ||
724 | mutex_lock(&data->update_lock); | 724 | mutex_lock(&data->update_lock); |
@@ -751,7 +751,7 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr, | |||
751 | int min; | 751 | int min; |
752 | u8 old; | 752 | u8 old; |
753 | 753 | ||
754 | if (strict_strtoul(buf, 10, &val) < 0) | 754 | if (kstrtoul(buf, 10, &val) < 0) |
755 | return -EINVAL; | 755 | return -EINVAL; |
756 | 756 | ||
757 | mutex_lock(&data->update_lock); | 757 | mutex_lock(&data->update_lock); |
@@ -820,7 +820,7 @@ static ssize_t set_pwm_enable(struct device *dev, | |||
820 | struct it87_data *data = dev_get_drvdata(dev); | 820 | struct it87_data *data = dev_get_drvdata(dev); |
821 | long val; | 821 | long val; |
822 | 822 | ||
823 | if (strict_strtol(buf, 10, &val) < 0 || val < 0 || val > 2) | 823 | if (kstrtol(buf, 10, &val) < 0 || val < 0 || val > 2) |
824 | return -EINVAL; | 824 | return -EINVAL; |
825 | 825 | ||
826 | /* Check trip points before switching to automatic mode */ | 826 | /* Check trip points before switching to automatic mode */ |
@@ -866,7 +866,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, | |||
866 | struct it87_data *data = dev_get_drvdata(dev); | 866 | struct it87_data *data = dev_get_drvdata(dev); |
867 | long val; | 867 | long val; |
868 | 868 | ||
869 | if (strict_strtol(buf, 10, &val) < 0 || val < 0 || val > 255) | 869 | if (kstrtol(buf, 10, &val) < 0 || val < 0 || val > 255) |
870 | return -EINVAL; | 870 | return -EINVAL; |
871 | 871 | ||
872 | mutex_lock(&data->update_lock); | 872 | mutex_lock(&data->update_lock); |
@@ -900,7 +900,7 @@ static ssize_t set_pwm_freq(struct device *dev, | |||
900 | unsigned long val; | 900 | unsigned long val; |
901 | int i; | 901 | int i; |
902 | 902 | ||
903 | if (strict_strtoul(buf, 10, &val) < 0) | 903 | if (kstrtoul(buf, 10, &val) < 0) |
904 | return -EINVAL; | 904 | return -EINVAL; |
905 | 905 | ||
906 | /* Search for the nearest available frequency */ | 906 | /* Search for the nearest available frequency */ |
@@ -949,7 +949,7 @@ static ssize_t set_pwm_temp_map(struct device *dev, | |||
949 | return -EINVAL; | 949 | return -EINVAL; |
950 | } | 950 | } |
951 | 951 | ||
952 | if (strict_strtol(buf, 10, &val) < 0) | 952 | if (kstrtol(buf, 10, &val) < 0) |
953 | return -EINVAL; | 953 | return -EINVAL; |
954 | 954 | ||
955 | switch (val) { | 955 | switch (val) { |
@@ -1001,7 +1001,7 @@ static ssize_t set_auto_pwm(struct device *dev, | |||
1001 | int point = sensor_attr->index; | 1001 | int point = sensor_attr->index; |
1002 | long val; | 1002 | long val; |
1003 | 1003 | ||
1004 | if (strict_strtol(buf, 10, &val) < 0 || val < 0 || val > 255) | 1004 | if (kstrtol(buf, 10, &val) < 0 || val < 0 || val > 255) |
1005 | return -EINVAL; | 1005 | return -EINVAL; |
1006 | 1006 | ||
1007 | mutex_lock(&data->update_lock); | 1007 | mutex_lock(&data->update_lock); |
@@ -1034,7 +1034,7 @@ static ssize_t set_auto_temp(struct device *dev, | |||
1034 | int point = sensor_attr->index; | 1034 | int point = sensor_attr->index; |
1035 | long val; | 1035 | long val; |
1036 | 1036 | ||
1037 | if (strict_strtol(buf, 10, &val) < 0 || val < -128000 || val > 127000) | 1037 | if (kstrtol(buf, 10, &val) < 0 || val < -128000 || val > 127000) |
1038 | return -EINVAL; | 1038 | return -EINVAL; |
1039 | 1039 | ||
1040 | mutex_lock(&data->update_lock); | 1040 | mutex_lock(&data->update_lock); |
@@ -1126,7 +1126,7 @@ static ssize_t set_fan16_min(struct device *dev, struct device_attribute *attr, | |||
1126 | struct it87_data *data = dev_get_drvdata(dev); | 1126 | struct it87_data *data = dev_get_drvdata(dev); |
1127 | long val; | 1127 | long val; |
1128 | 1128 | ||
1129 | if (strict_strtol(buf, 10, &val) < 0) | 1129 | if (kstrtol(buf, 10, &val) < 0) |
1130 | return -EINVAL; | 1130 | return -EINVAL; |
1131 | 1131 | ||
1132 | mutex_lock(&data->update_lock); | 1132 | mutex_lock(&data->update_lock); |
@@ -1180,7 +1180,7 @@ static ssize_t clear_intrusion(struct device *dev, struct device_attribute | |||
1180 | long val; | 1180 | long val; |
1181 | int config; | 1181 | int config; |
1182 | 1182 | ||
1183 | if (strict_strtol(buf, 10, &val) < 0 || val != 0) | 1183 | if (kstrtol(buf, 10, &val) < 0 || val != 0) |
1184 | return -EINVAL; | 1184 | return -EINVAL; |
1185 | 1185 | ||
1186 | mutex_lock(&data->update_lock); | 1186 | mutex_lock(&data->update_lock); |
@@ -1231,7 +1231,7 @@ static ssize_t set_beep(struct device *dev, struct device_attribute *attr, | |||
1231 | struct it87_data *data = dev_get_drvdata(dev); | 1231 | struct it87_data *data = dev_get_drvdata(dev); |
1232 | long val; | 1232 | long val; |
1233 | 1233 | ||
1234 | if (strict_strtol(buf, 10, &val) < 0 | 1234 | if (kstrtol(buf, 10, &val) < 0 |
1235 | || (val != 0 && val != 1)) | 1235 | || (val != 0 && val != 1)) |
1236 | return -EINVAL; | 1236 | return -EINVAL; |
1237 | 1237 | ||
@@ -1278,7 +1278,7 @@ static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr, | |||
1278 | struct it87_data *data = dev_get_drvdata(dev); | 1278 | struct it87_data *data = dev_get_drvdata(dev); |
1279 | unsigned long val; | 1279 | unsigned long val; |
1280 | 1280 | ||
1281 | if (strict_strtoul(buf, 10, &val) < 0) | 1281 | if (kstrtoul(buf, 10, &val) < 0) |
1282 | return -EINVAL; | 1282 | return -EINVAL; |
1283 | 1283 | ||
1284 | data->vrm = val; | 1284 | data->vrm = val; |