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>
Este cometimento está contido em:

cometido por
Guenter Roeck

ascendente
24edc0a71b
cometimento
179c4fdb56
@@ -449,7 +449,7 @@ static ssize_t set_auto_update_interval(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = SENSORS_LIMIT(temp, 0, 60000);
|
||||
@@ -478,7 +478,7 @@ static ssize_t set_num_temp_sensors(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = SENSORS_LIMIT(temp, -1, 10);
|
||||
@@ -511,7 +511,7 @@ static ssize_t set_temp_min(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000);
|
||||
@@ -545,7 +545,7 @@ static ssize_t set_temp_max(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000);
|
||||
@@ -600,7 +600,7 @@ static ssize_t set_fan_max(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp) || !temp)
|
||||
if (kstrtol(buf, 10, &temp) || !temp)
|
||||
return -EINVAL;
|
||||
|
||||
temp = FAN_RPM_TO_PERIOD(temp);
|
||||
@@ -637,7 +637,7 @@ static ssize_t set_fan_min(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp) || !temp)
|
||||
if (kstrtol(buf, 10, &temp) || !temp)
|
||||
return -EINVAL;
|
||||
|
||||
temp = FAN_RPM_TO_PERIOD(temp);
|
||||
@@ -682,7 +682,7 @@ static ssize_t set_force_pwm_max(struct device *dev,
|
||||
long temp;
|
||||
u8 reg;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -714,7 +714,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = SENSORS_LIMIT(temp, 0, 255);
|
||||
@@ -746,7 +746,7 @@ static ssize_t set_pwm_max(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = SENSORS_LIMIT(temp, 0, 255);
|
||||
@@ -779,7 +779,7 @@ static ssize_t set_pwm_min(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = SENSORS_LIMIT(temp, 0, 255);
|
||||
@@ -822,7 +822,7 @@ static ssize_t set_pwm_tmin(struct device *dev,
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000);
|
||||
@@ -859,7 +859,7 @@ static ssize_t set_pwm_auto(struct device *dev,
|
||||
long temp;
|
||||
u8 reg;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
if (attr->index % 2)
|
||||
@@ -919,7 +919,7 @@ static ssize_t set_pwm_auto_temp(struct device *dev,
|
||||
long temp;
|
||||
u8 reg;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = cvt_auto_temp(temp);
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador