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/adt7462.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/adt7462.c')
-rw-r--r-- | drivers/hwmon/adt7462.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c index 2af0c7b6b4e4..7a1494846cfd 100644 --- a/drivers/hwmon/adt7462.c +++ b/drivers/hwmon/adt7462.c | |||
@@ -833,7 +833,7 @@ static ssize_t set_temp_min(struct device *dev, | |||
833 | struct adt7462_data *data = i2c_get_clientdata(client); | 833 | struct adt7462_data *data = i2c_get_clientdata(client); |
834 | long temp; | 834 | long temp; |
835 | 835 | ||
836 | if (strict_strtol(buf, 10, &temp) || !temp_enabled(data, attr->index)) | 836 | if (kstrtol(buf, 10, &temp) || !temp_enabled(data, attr->index)) |
837 | return -EINVAL; | 837 | return -EINVAL; |
838 | 838 | ||
839 | temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; | 839 | temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; |
@@ -871,7 +871,7 @@ static ssize_t set_temp_max(struct device *dev, | |||
871 | struct adt7462_data *data = i2c_get_clientdata(client); | 871 | struct adt7462_data *data = i2c_get_clientdata(client); |
872 | long temp; | 872 | long temp; |
873 | 873 | ||
874 | if (strict_strtol(buf, 10, &temp) || !temp_enabled(data, attr->index)) | 874 | if (kstrtol(buf, 10, &temp) || !temp_enabled(data, attr->index)) |
875 | return -EINVAL; | 875 | return -EINVAL; |
876 | 876 | ||
877 | temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; | 877 | temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; |
@@ -935,7 +935,7 @@ static ssize_t set_volt_max(struct device *dev, | |||
935 | int x = voltage_multiplier(data, attr->index); | 935 | int x = voltage_multiplier(data, attr->index); |
936 | long temp; | 936 | long temp; |
937 | 937 | ||
938 | if (strict_strtol(buf, 10, &temp) || !x) | 938 | if (kstrtol(buf, 10, &temp) || !x) |
939 | return -EINVAL; | 939 | return -EINVAL; |
940 | 940 | ||
941 | temp *= 1000; /* convert mV to uV */ | 941 | temp *= 1000; /* convert mV to uV */ |
@@ -977,7 +977,7 @@ static ssize_t set_volt_min(struct device *dev, | |||
977 | int x = voltage_multiplier(data, attr->index); | 977 | int x = voltage_multiplier(data, attr->index); |
978 | long temp; | 978 | long temp; |
979 | 979 | ||
980 | if (strict_strtol(buf, 10, &temp) || !x) | 980 | if (kstrtol(buf, 10, &temp) || !x) |
981 | return -EINVAL; | 981 | return -EINVAL; |
982 | 982 | ||
983 | temp *= 1000; /* convert mV to uV */ | 983 | temp *= 1000; /* convert mV to uV */ |
@@ -1066,7 +1066,7 @@ static ssize_t set_fan_min(struct device *dev, | |||
1066 | struct adt7462_data *data = i2c_get_clientdata(client); | 1066 | struct adt7462_data *data = i2c_get_clientdata(client); |
1067 | long temp; | 1067 | long temp; |
1068 | 1068 | ||
1069 | if (strict_strtol(buf, 10, &temp) || !temp || | 1069 | if (kstrtol(buf, 10, &temp) || !temp || |
1070 | !fan_enabled(data, attr->index)) | 1070 | !fan_enabled(data, attr->index)) |
1071 | return -EINVAL; | 1071 | return -EINVAL; |
1072 | 1072 | ||
@@ -1115,7 +1115,7 @@ static ssize_t set_force_pwm_max(struct device *dev, | |||
1115 | long temp; | 1115 | long temp; |
1116 | u8 reg; | 1116 | u8 reg; |
1117 | 1117 | ||
1118 | if (strict_strtol(buf, 10, &temp)) | 1118 | if (kstrtol(buf, 10, &temp)) |
1119 | return -EINVAL; | 1119 | return -EINVAL; |
1120 | 1120 | ||
1121 | mutex_lock(&data->lock); | 1121 | mutex_lock(&data->lock); |
@@ -1147,7 +1147,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr, | |||
1147 | struct adt7462_data *data = i2c_get_clientdata(client); | 1147 | struct adt7462_data *data = i2c_get_clientdata(client); |
1148 | long temp; | 1148 | long temp; |
1149 | 1149 | ||
1150 | if (strict_strtol(buf, 10, &temp)) | 1150 | if (kstrtol(buf, 10, &temp)) |
1151 | return -EINVAL; | 1151 | return -EINVAL; |
1152 | 1152 | ||
1153 | temp = SENSORS_LIMIT(temp, 0, 255); | 1153 | temp = SENSORS_LIMIT(temp, 0, 255); |
@@ -1177,7 +1177,7 @@ static ssize_t set_pwm_max(struct device *dev, | |||
1177 | struct adt7462_data *data = i2c_get_clientdata(client); | 1177 | struct adt7462_data *data = i2c_get_clientdata(client); |
1178 | long temp; | 1178 | long temp; |
1179 | 1179 | ||
1180 | if (strict_strtol(buf, 10, &temp)) | 1180 | if (kstrtol(buf, 10, &temp)) |
1181 | return -EINVAL; | 1181 | return -EINVAL; |
1182 | 1182 | ||
1183 | temp = SENSORS_LIMIT(temp, 0, 255); | 1183 | temp = SENSORS_LIMIT(temp, 0, 255); |
@@ -1209,7 +1209,7 @@ static ssize_t set_pwm_min(struct device *dev, | |||
1209 | struct adt7462_data *data = i2c_get_clientdata(client); | 1209 | struct adt7462_data *data = i2c_get_clientdata(client); |
1210 | long temp; | 1210 | long temp; |
1211 | 1211 | ||
1212 | if (strict_strtol(buf, 10, &temp)) | 1212 | if (kstrtol(buf, 10, &temp)) |
1213 | return -EINVAL; | 1213 | return -EINVAL; |
1214 | 1214 | ||
1215 | temp = SENSORS_LIMIT(temp, 0, 255); | 1215 | temp = SENSORS_LIMIT(temp, 0, 255); |
@@ -1243,7 +1243,7 @@ static ssize_t set_pwm_hyst(struct device *dev, | |||
1243 | struct adt7462_data *data = i2c_get_clientdata(client); | 1243 | struct adt7462_data *data = i2c_get_clientdata(client); |
1244 | long temp; | 1244 | long temp; |
1245 | 1245 | ||
1246 | if (strict_strtol(buf, 10, &temp)) | 1246 | if (kstrtol(buf, 10, &temp)) |
1247 | return -EINVAL; | 1247 | return -EINVAL; |
1248 | 1248 | ||
1249 | temp = DIV_ROUND_CLOSEST(temp, 1000); | 1249 | temp = DIV_ROUND_CLOSEST(temp, 1000); |
@@ -1289,7 +1289,7 @@ static ssize_t set_pwm_tmax(struct device *dev, | |||
1289 | int tmin, trange_value; | 1289 | int tmin, trange_value; |
1290 | long trange; | 1290 | long trange; |
1291 | 1291 | ||
1292 | if (strict_strtol(buf, 10, &trange)) | 1292 | if (kstrtol(buf, 10, &trange)) |
1293 | return -EINVAL; | 1293 | return -EINVAL; |
1294 | 1294 | ||
1295 | /* trange = tmax - tmin */ | 1295 | /* trange = tmax - tmin */ |
@@ -1330,7 +1330,7 @@ static ssize_t set_pwm_tmin(struct device *dev, | |||
1330 | struct adt7462_data *data = i2c_get_clientdata(client); | 1330 | struct adt7462_data *data = i2c_get_clientdata(client); |
1331 | long temp; | 1331 | long temp; |
1332 | 1332 | ||
1333 | if (strict_strtol(buf, 10, &temp)) | 1333 | if (kstrtol(buf, 10, &temp)) |
1334 | return -EINVAL; | 1334 | return -EINVAL; |
1335 | 1335 | ||
1336 | temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; | 1336 | temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; |
@@ -1387,7 +1387,7 @@ static ssize_t set_pwm_auto(struct device *dev, | |||
1387 | struct adt7462_data *data = i2c_get_clientdata(client); | 1387 | struct adt7462_data *data = i2c_get_clientdata(client); |
1388 | long temp; | 1388 | long temp; |
1389 | 1389 | ||
1390 | if (strict_strtol(buf, 10, &temp)) | 1390 | if (kstrtol(buf, 10, &temp)) |
1391 | return -EINVAL; | 1391 | return -EINVAL; |
1392 | 1392 | ||
1393 | switch (temp) { | 1393 | switch (temp) { |
@@ -1446,7 +1446,7 @@ static ssize_t set_pwm_auto_temp(struct device *dev, | |||
1446 | struct adt7462_data *data = i2c_get_clientdata(client); | 1446 | struct adt7462_data *data = i2c_get_clientdata(client); |
1447 | long temp; | 1447 | long temp; |
1448 | 1448 | ||
1449 | if (strict_strtol(buf, 10, &temp)) | 1449 | if (kstrtol(buf, 10, &temp)) |
1450 | return -EINVAL; | 1450 | return -EINVAL; |
1451 | 1451 | ||
1452 | temp = cvt_auto_temp(temp); | 1452 | temp = cvt_auto_temp(temp); |