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/w83795.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/w83795.c')
-rw-r--r-- | drivers/hwmon/w83795.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c index 845232d7f611..3ee398d0e4c9 100644 --- a/drivers/hwmon/w83795.c +++ b/drivers/hwmon/w83795.c | |||
@@ -730,7 +730,7 @@ store_beep(struct device *dev, struct device_attribute *attr, | |||
730 | u8 beep_bit = 1 << shift; | 730 | u8 beep_bit = 1 << shift; |
731 | unsigned long val; | 731 | unsigned long val; |
732 | 732 | ||
733 | if (strict_strtoul(buf, 10, &val) < 0) | 733 | if (kstrtoul(buf, 10, &val) < 0) |
734 | return -EINVAL; | 734 | return -EINVAL; |
735 | if (val != 0 && val != 1) | 735 | if (val != 0 && val != 1) |
736 | return -EINVAL; | 736 | return -EINVAL; |
@@ -755,7 +755,7 @@ store_chassis_clear(struct device *dev, | |||
755 | struct w83795_data *data = i2c_get_clientdata(client); | 755 | struct w83795_data *data = i2c_get_clientdata(client); |
756 | unsigned long val; | 756 | unsigned long val; |
757 | 757 | ||
758 | if (strict_strtoul(buf, 10, &val) < 0 || val != 0) | 758 | if (kstrtoul(buf, 10, &val) < 0 || val != 0) |
759 | return -EINVAL; | 759 | return -EINVAL; |
760 | 760 | ||
761 | mutex_lock(&data->update_lock); | 761 | mutex_lock(&data->update_lock); |
@@ -801,7 +801,7 @@ store_fan_min(struct device *dev, struct device_attribute *attr, | |||
801 | struct w83795_data *data = i2c_get_clientdata(client); | 801 | struct w83795_data *data = i2c_get_clientdata(client); |
802 | unsigned long val; | 802 | unsigned long val; |
803 | 803 | ||
804 | if (strict_strtoul(buf, 10, &val)) | 804 | if (kstrtoul(buf, 10, &val)) |
805 | return -EINVAL; | 805 | return -EINVAL; |
806 | val = fan_to_reg(val); | 806 | val = fan_to_reg(val); |
807 | 807 | ||
@@ -863,7 +863,7 @@ store_pwm(struct device *dev, struct device_attribute *attr, | |||
863 | int index = sensor_attr->index; | 863 | int index = sensor_attr->index; |
864 | unsigned long val; | 864 | unsigned long val; |
865 | 865 | ||
866 | if (strict_strtoul(buf, 10, &val) < 0) | 866 | if (kstrtoul(buf, 10, &val) < 0) |
867 | return -EINVAL; | 867 | return -EINVAL; |
868 | 868 | ||
869 | mutex_lock(&data->update_lock); | 869 | mutex_lock(&data->update_lock); |
@@ -924,7 +924,7 @@ store_pwm_enable(struct device *dev, struct device_attribute *attr, | |||
924 | unsigned long val; | 924 | unsigned long val; |
925 | int i; | 925 | int i; |
926 | 926 | ||
927 | if (strict_strtoul(buf, 10, &val) < 0) | 927 | if (kstrtoul(buf, 10, &val) < 0) |
928 | return -EINVAL; | 928 | return -EINVAL; |
929 | if (val < 1 || val > 2) | 929 | if (val < 1 || val > 2) |
930 | return -EINVAL; | 930 | return -EINVAL; |
@@ -1021,7 +1021,7 @@ store_temp_src(struct device *dev, struct device_attribute *attr, | |||
1021 | unsigned long channel; | 1021 | unsigned long channel; |
1022 | u8 val = index / 2; | 1022 | u8 val = index / 2; |
1023 | 1023 | ||
1024 | if (strict_strtoul(buf, 10, &channel) < 0 || | 1024 | if (kstrtoul(buf, 10, &channel) < 0 || |
1025 | channel < 1 || channel > 14) | 1025 | channel < 1 || channel > 14) |
1026 | return -EINVAL; | 1026 | return -EINVAL; |
1027 | 1027 | ||
@@ -1088,7 +1088,7 @@ store_temp_pwm_enable(struct device *dev, struct device_attribute *attr, | |||
1088 | int index = sensor_attr->index; | 1088 | int index = sensor_attr->index; |
1089 | unsigned long tmp; | 1089 | unsigned long tmp; |
1090 | 1090 | ||
1091 | if (strict_strtoul(buf, 10, &tmp) < 0) | 1091 | if (kstrtoul(buf, 10, &tmp) < 0) |
1092 | return -EINVAL; | 1092 | return -EINVAL; |
1093 | 1093 | ||
1094 | switch (nr) { | 1094 | switch (nr) { |
@@ -1149,7 +1149,7 @@ store_fanin(struct device *dev, struct device_attribute *attr, | |||
1149 | int index = sensor_attr->index; | 1149 | int index = sensor_attr->index; |
1150 | unsigned long val; | 1150 | unsigned long val; |
1151 | 1151 | ||
1152 | if (strict_strtoul(buf, 10, &val) < 0) | 1152 | if (kstrtoul(buf, 10, &val) < 0) |
1153 | return -EINVAL; | 1153 | return -EINVAL; |
1154 | 1154 | ||
1155 | mutex_lock(&data->update_lock); | 1155 | mutex_lock(&data->update_lock); |
@@ -1198,7 +1198,7 @@ store_temp_pwm(struct device *dev, struct device_attribute *attr, | |||
1198 | unsigned long val; | 1198 | unsigned long val; |
1199 | u8 tmp; | 1199 | u8 tmp; |
1200 | 1200 | ||
1201 | if (strict_strtoul(buf, 10, &val) < 0) | 1201 | if (kstrtoul(buf, 10, &val) < 0) |
1202 | return -EINVAL; | 1202 | return -EINVAL; |
1203 | val /= 1000; | 1203 | val /= 1000; |
1204 | 1204 | ||
@@ -1257,7 +1257,7 @@ store_sf4_pwm(struct device *dev, struct device_attribute *attr, | |||
1257 | int index = sensor_attr->index; | 1257 | int index = sensor_attr->index; |
1258 | unsigned long val; | 1258 | unsigned long val; |
1259 | 1259 | ||
1260 | if (strict_strtoul(buf, 10, &val) < 0) | 1260 | if (kstrtoul(buf, 10, &val) < 0) |
1261 | return -EINVAL; | 1261 | return -EINVAL; |
1262 | 1262 | ||
1263 | mutex_lock(&data->update_lock); | 1263 | mutex_lock(&data->update_lock); |
@@ -1293,7 +1293,7 @@ store_sf4_temp(struct device *dev, struct device_attribute *attr, | |||
1293 | int index = sensor_attr->index; | 1293 | int index = sensor_attr->index; |
1294 | unsigned long val; | 1294 | unsigned long val; |
1295 | 1295 | ||
1296 | if (strict_strtoul(buf, 10, &val) < 0) | 1296 | if (kstrtoul(buf, 10, &val) < 0) |
1297 | return -EINVAL; | 1297 | return -EINVAL; |
1298 | val /= 1000; | 1298 | val /= 1000; |
1299 | 1299 | ||
@@ -1333,7 +1333,7 @@ store_temp(struct device *dev, struct device_attribute *attr, | |||
1333 | struct w83795_data *data = i2c_get_clientdata(client); | 1333 | struct w83795_data *data = i2c_get_clientdata(client); |
1334 | long tmp; | 1334 | long tmp; |
1335 | 1335 | ||
1336 | if (strict_strtol(buf, 10, &tmp) < 0) | 1336 | if (kstrtol(buf, 10, &tmp) < 0) |
1337 | return -EINVAL; | 1337 | return -EINVAL; |
1338 | 1338 | ||
1339 | mutex_lock(&data->update_lock); | 1339 | mutex_lock(&data->update_lock); |
@@ -1394,7 +1394,7 @@ store_dts_ext(struct device *dev, struct device_attribute *attr, | |||
1394 | struct w83795_data *data = i2c_get_clientdata(client); | 1394 | struct w83795_data *data = i2c_get_clientdata(client); |
1395 | long tmp; | 1395 | long tmp; |
1396 | 1396 | ||
1397 | if (strict_strtol(buf, 10, &tmp) < 0) | 1397 | if (kstrtol(buf, 10, &tmp) < 0) |
1398 | return -EINVAL; | 1398 | return -EINVAL; |
1399 | 1399 | ||
1400 | mutex_lock(&data->update_lock); | 1400 | mutex_lock(&data->update_lock); |
@@ -1436,7 +1436,7 @@ store_temp_mode(struct device *dev, struct device_attribute *attr, | |||
1436 | unsigned long val; | 1436 | unsigned long val; |
1437 | u8 tmp; | 1437 | u8 tmp; |
1438 | 1438 | ||
1439 | if (strict_strtoul(buf, 10, &val) < 0) | 1439 | if (kstrtoul(buf, 10, &val) < 0) |
1440 | return -EINVAL; | 1440 | return -EINVAL; |
1441 | if ((val != 4) && (val != 3)) | 1441 | if ((val != 4) && (val != 3)) |
1442 | return -EINVAL; | 1442 | return -EINVAL; |
@@ -1512,7 +1512,7 @@ store_in(struct device *dev, struct device_attribute *attr, | |||
1512 | u8 tmp; | 1512 | u8 tmp; |
1513 | u8 lsb_idx; | 1513 | u8 lsb_idx; |
1514 | 1514 | ||
1515 | if (strict_strtoul(buf, 10, &val) < 0) | 1515 | if (kstrtoul(buf, 10, &val) < 0) |
1516 | return -EINVAL; | 1516 | return -EINVAL; |
1517 | val = in_to_reg(index, val); | 1517 | val = in_to_reg(index, val); |
1518 | 1518 | ||
@@ -1569,7 +1569,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr, | |||
1569 | struct w83795_data *data = i2c_get_clientdata(client); | 1569 | struct w83795_data *data = i2c_get_clientdata(client); |
1570 | unsigned long val; | 1570 | unsigned long val; |
1571 | 1571 | ||
1572 | if (strict_strtoul(buf, 10, &val) < 0) | 1572 | if (kstrtoul(buf, 10, &val) < 0) |
1573 | return -EINVAL; | 1573 | return -EINVAL; |
1574 | 1574 | ||
1575 | switch (nr) { | 1575 | switch (nr) { |