You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Guenter Roeck
parent
24edc0a71b
commit
179c4fdb56
@@ -170,7 +170,7 @@ static ssize_t set_avg_interval(struct device *dev,
|
||||
unsigned long long data;
|
||||
acpi_status status;
|
||||
|
||||
res = strict_strtoul(buf, 10, &temp);
|
||||
res = kstrtoul(buf, 10, &temp);
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
@@ -241,7 +241,7 @@ static ssize_t set_cap(struct device *dev, struct device_attribute *devattr,
|
||||
unsigned long long data;
|
||||
acpi_status status;
|
||||
|
||||
res = strict_strtoul(buf, 10, &temp);
|
||||
res = kstrtoul(buf, 10, &temp);
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
@@ -311,7 +311,7 @@ static ssize_t set_trip(struct device *dev, struct device_attribute *devattr,
|
||||
int res;
|
||||
unsigned long temp;
|
||||
|
||||
res = strict_strtoul(buf, 10, &temp);
|
||||
res = kstrtoul(buf, 10, &temp);
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ static ssize_t adcxx_set_max(struct device *dev,
|
||||
struct adcxx *adc = spi_get_drvdata(spi);
|
||||
unsigned long value;
|
||||
|
||||
if (strict_strtoul(buf, 10, &value))
|
||||
if (kstrtoul(buf, 10, &value))
|
||||
return -EINVAL;
|
||||
|
||||
if (mutex_lock_interruptible(&adc->lock))
|
||||
|
||||
@@ -767,7 +767,7 @@ static ssize_t set_update_interval(struct device *dev,
|
||||
int i, err;
|
||||
u8 reg;
|
||||
|
||||
err = strict_strtoul(buf, 10, &val);
|
||||
err = kstrtoul(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ static ssize_t chassis_clear(struct device *dev,
|
||||
struct adm9240_data *data = i2c_get_clientdata(client);
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val) || val != 0)
|
||||
if (kstrtoul(buf, 10, &val) || val != 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
|
||||
@@ -197,7 +197,7 @@ static ssize_t adt7411_set_bit(struct device *dev,
|
||||
int ret;
|
||||
unsigned long flag;
|
||||
|
||||
ret = strict_strtoul(buf, 0, &flag);
|
||||
ret = kstrtoul(buf, 0, &flag);
|
||||
if (ret || flag > 1)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
+14
-14
@@ -833,7 +833,7 @@ static ssize_t set_temp_min(struct device *dev,
|
||||
struct adt7462_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp) || !temp_enabled(data, attr->index))
|
||||
if (kstrtol(buf, 10, &temp) || !temp_enabled(data, attr->index))
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000) + 64;
|
||||
@@ -871,7 +871,7 @@ static ssize_t set_temp_max(struct device *dev,
|
||||
struct adt7462_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp) || !temp_enabled(data, attr->index))
|
||||
if (kstrtol(buf, 10, &temp) || !temp_enabled(data, attr->index))
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000) + 64;
|
||||
@@ -935,7 +935,7 @@ static ssize_t set_volt_max(struct device *dev,
|
||||
int x = voltage_multiplier(data, attr->index);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp) || !x)
|
||||
if (kstrtol(buf, 10, &temp) || !x)
|
||||
return -EINVAL;
|
||||
|
||||
temp *= 1000; /* convert mV to uV */
|
||||
@@ -977,7 +977,7 @@ static ssize_t set_volt_min(struct device *dev,
|
||||
int x = voltage_multiplier(data, attr->index);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp) || !x)
|
||||
if (kstrtol(buf, 10, &temp) || !x)
|
||||
return -EINVAL;
|
||||
|
||||
temp *= 1000; /* convert mV to uV */
|
||||
@@ -1066,7 +1066,7 @@ static ssize_t set_fan_min(struct device *dev,
|
||||
struct adt7462_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp) || !temp ||
|
||||
if (kstrtol(buf, 10, &temp) || !temp ||
|
||||
!fan_enabled(data, attr->index))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1115,7 +1115,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);
|
||||
@@ -1147,7 +1147,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
|
||||
struct adt7462_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);
|
||||
@@ -1177,7 +1177,7 @@ static ssize_t set_pwm_max(struct device *dev,
|
||||
struct adt7462_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);
|
||||
@@ -1209,7 +1209,7 @@ static ssize_t set_pwm_min(struct device *dev,
|
||||
struct adt7462_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);
|
||||
@@ -1243,7 +1243,7 @@ static ssize_t set_pwm_hyst(struct device *dev,
|
||||
struct adt7462_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);
|
||||
@@ -1289,7 +1289,7 @@ static ssize_t set_pwm_tmax(struct device *dev,
|
||||
int tmin, trange_value;
|
||||
long trange;
|
||||
|
||||
if (strict_strtol(buf, 10, &trange))
|
||||
if (kstrtol(buf, 10, &trange))
|
||||
return -EINVAL;
|
||||
|
||||
/* trange = tmax - tmin */
|
||||
@@ -1330,7 +1330,7 @@ static ssize_t set_pwm_tmin(struct device *dev,
|
||||
struct adt7462_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) + 64;
|
||||
@@ -1387,7 +1387,7 @@ static ssize_t set_pwm_auto(struct device *dev,
|
||||
struct adt7462_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
switch (temp) {
|
||||
@@ -1446,7 +1446,7 @@ static ssize_t set_pwm_auto_temp(struct device *dev,
|
||||
struct adt7462_data *data = i2c_get_clientdata(client);
|
||||
long temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &temp))
|
||||
if (kstrtol(buf, 10, &temp))
|
||||
return -EINVAL;
|
||||
|
||||
temp = cvt_auto_temp(temp);
|
||||
|
||||
+13
-13
@@ -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);
|
||||
|
||||
+10
-10
@@ -343,7 +343,7 @@ static ssize_t set_voltage(struct device *dev, struct device_attribute *attr,
|
||||
unsigned char reg;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -432,7 +432,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *attr,
|
||||
int temp;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -546,7 +546,7 @@ static ssize_t set_point2(struct device *dev, struct device_attribute *attr,
|
||||
int temp;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -602,7 +602,7 @@ static ssize_t set_tach(struct device *dev, struct device_attribute *attr,
|
||||
struct adt7475_data *data = i2c_get_clientdata(client);
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val))
|
||||
if (kstrtoul(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -653,7 +653,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr,
|
||||
unsigned char reg = 0;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -758,7 +758,7 @@ static ssize_t set_pwmchan(struct device *dev, struct device_attribute *attr,
|
||||
int r;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -781,7 +781,7 @@ static ssize_t set_pwmctrl(struct device *dev, struct device_attribute *attr,
|
||||
int r;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
@@ -819,7 +819,7 @@ static ssize_t set_pwmfreq(struct device *dev, struct device_attribute *attr,
|
||||
int out;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
out = find_nearest(val, pwmfreq_table, ARRAY_SIZE(pwmfreq_table));
|
||||
@@ -853,7 +853,7 @@ static ssize_t set_pwm_at_crit(struct device *dev,
|
||||
struct adt7475_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
if (val != 0 && val != 1)
|
||||
return -EINVAL;
|
||||
@@ -883,7 +883,7 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *devattr,
|
||||
struct adt7475_data *data = dev_get_drvdata(dev);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val))
|
||||
if (kstrtol(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
if (val < 0 || val > 255)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -238,7 +238,7 @@ static ssize_t set_temp(
|
||||
int ix = to_sensor_dev_attr(attr)->index;
|
||||
long val;
|
||||
|
||||
int ret = strict_strtol(buf, 10, &val);
|
||||
int ret = kstrtol(buf, 10, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
val = SENSORS_LIMIT(val / 1000, -128, 127);
|
||||
@@ -327,7 +327,7 @@ static ssize_t set_pwm1(
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct amc6821_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
int ret = strict_strtol(buf, 10, &val);
|
||||
int ret = kstrtol(buf, 10, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -356,7 +356,7 @@ static ssize_t set_pwm1_enable(
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct amc6821_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
int config = strict_strtol(buf, 10, &val);
|
||||
int config = kstrtol(buf, 10, &val);
|
||||
if (config)
|
||||
return config;
|
||||
|
||||
@@ -477,7 +477,7 @@ static ssize_t set_temp_auto_point_temp(
|
||||
u8 reg;
|
||||
int dpwm;
|
||||
long val;
|
||||
int ret = strict_strtol(buf, 10, &val);
|
||||
int ret = kstrtol(buf, 10, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -556,7 +556,7 @@ static ssize_t set_pwm1_auto_point_pwm(
|
||||
struct amc6821_data *data = i2c_get_clientdata(client);
|
||||
int dpwm;
|
||||
long val;
|
||||
int ret = strict_strtol(buf, 10, &val);
|
||||
int ret = kstrtol(buf, 10, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -623,7 +623,7 @@ static ssize_t set_fan(
|
||||
struct amc6821_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
int ix = to_sensor_dev_attr(attr)->index;
|
||||
int ret = strict_strtol(buf, 10, &val);
|
||||
int ret = kstrtol(buf, 10, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
val = 1 > val ? 0xFFFF : 6000000/val;
|
||||
@@ -665,7 +665,7 @@ static ssize_t set_fan1_div(
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct amc6821_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
int config = strict_strtol(buf, 10, &val);
|
||||
int config = kstrtol(buf, 10, &val);
|
||||
if (config)
|
||||
return config;
|
||||
|
||||
|
||||
@@ -782,7 +782,7 @@ static ssize_t applesmc_store_fan_speed(struct device *dev,
|
||||
char newkey[5];
|
||||
u8 buffer[2];
|
||||
|
||||
if (strict_strtoul(sysfsbuf, 10, &speed) < 0 || speed >= 0x4000)
|
||||
if (kstrtoul(sysfsbuf, 10, &speed) < 0 || speed >= 0x4000)
|
||||
return -EINVAL; /* Bigger than a 14-bit value */
|
||||
|
||||
sprintf(newkey, fan_speed_fmt[to_option(attr)], to_index(attr));
|
||||
@@ -822,7 +822,7 @@ static ssize_t applesmc_store_fan_manual(struct device *dev,
|
||||
unsigned long input;
|
||||
u16 val;
|
||||
|
||||
if (strict_strtoul(sysfsbuf, 10, &input) < 0)
|
||||
if (kstrtoul(sysfsbuf, 10, &input) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
ret = applesmc_read_key(FANS_MANUAL, buffer, 2);
|
||||
@@ -977,7 +977,7 @@ static ssize_t applesmc_key_at_index_store(struct device *dev,
|
||||
{
|
||||
unsigned long newkey;
|
||||
|
||||
if (strict_strtoul(sysfsbuf, 10, &newkey) < 0
|
||||
if (kstrtoul(sysfsbuf, 10, &newkey) < 0
|
||||
|| newkey >= smcreg.key_count)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
+12
-12
@@ -188,7 +188,7 @@ static ssize_t store_u8(struct device *dev, struct device_attribute *attr,
|
||||
SETUP_STORE_data_param(dev, attr);
|
||||
long reqval;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
reqval = SENSORS_LIMIT(reqval, 0, 255);
|
||||
@@ -221,7 +221,7 @@ static ssize_t store_bitmask(struct device *dev,
|
||||
long reqval;
|
||||
u8 currval;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
reqval = SENSORS_LIMIT(reqval, 0, param->mask[0]);
|
||||
@@ -265,7 +265,7 @@ static ssize_t store_fan16(struct device *dev,
|
||||
SETUP_STORE_data_param(dev, attr);
|
||||
long reqval;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
/* If a minimum RPM of zero is requested, then we set the register to
|
||||
@@ -338,7 +338,7 @@ static ssize_t store_in8(struct device *dev, struct device_attribute *attr,
|
||||
long reqval;
|
||||
u8 nr = sda->index;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
reqval = SENSORS_LIMIT(reqval, 0, 0xffff);
|
||||
@@ -371,7 +371,7 @@ static ssize_t store_temp8(struct device *dev,
|
||||
long reqval;
|
||||
s8 temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
reqval = SENSORS_LIMIT(reqval, -127000, 127000);
|
||||
@@ -427,7 +427,7 @@ static ssize_t store_temp62(struct device *dev,
|
||||
long reqval, i, f;
|
||||
s8 temp;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
reqval = SENSORS_LIMIT(reqval, -32000, 31750);
|
||||
@@ -482,7 +482,7 @@ static ssize_t store_ap2_temp(struct device *dev,
|
||||
int i;
|
||||
u8 currval, newval = 0;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -538,7 +538,7 @@ static ssize_t store_pwm_ac(struct device *dev,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
|
||||
};
|
||||
|
||||
if (strict_strtoul(buf, 10, &reqval))
|
||||
if (kstrtoul(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
if (reqval > 31)
|
||||
@@ -601,7 +601,7 @@ static ssize_t store_pwm_enable(struct device *dev,
|
||||
long reqval;
|
||||
u8 currval, config, altbit, newval, minoff = 255;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
switch (reqval) {
|
||||
@@ -675,7 +675,7 @@ static ssize_t store_pwm_freq(struct device *dev,
|
||||
u8 currval, newval = 255;
|
||||
int i;
|
||||
|
||||
if (strict_strtoul(buf, 10, &reqval))
|
||||
if (kstrtoul(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(asc7621_pwm_freq_map); i++) {
|
||||
@@ -724,7 +724,7 @@ static ssize_t store_pwm_ast(struct device *dev,
|
||||
u8 currval, newval = 255;
|
||||
u32 i;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(asc7621_pwm_auto_spinup_map); i++) {
|
||||
@@ -771,7 +771,7 @@ static ssize_t store_temp_st(struct device *dev,
|
||||
u8 currval, newval = 255;
|
||||
u32 i;
|
||||
|
||||
if (strict_strtol(buf, 10, &reqval))
|
||||
if (kstrtol(buf, 10, &reqval))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(asc7621_temp_smoothing_time_map); i++) {
|
||||
|
||||
@@ -161,7 +161,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da,
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct ds620_data *data = i2c_get_clientdata(client);
|
||||
|
||||
res = strict_strtol(buf, 10, &val);
|
||||
res = kstrtol(buf, 10, &val);
|
||||
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
@@ -80,7 +80,7 @@ static ssize_t store_temp(struct device *dev,
|
||||
unsigned long val;
|
||||
int retval;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val))
|
||||
if (kstrtoul(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
retval = i2c_smbus_write_byte_data(client, sda->index,
|
||||
DIV_ROUND_CLOSEST(val, 1000));
|
||||
@@ -98,7 +98,7 @@ static ssize_t store_bit(struct device *dev,
|
||||
unsigned long val;
|
||||
int retval;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val))
|
||||
if (kstrtoul(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
@@ -151,7 +151,7 @@ static ssize_t store_hyst(struct device *dev,
|
||||
int hyst;
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val))
|
||||
if (kstrtoul(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
|
||||
@@ -244,7 +244,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *da,
|
||||
struct emc2103_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
|
||||
int result = strict_strtol(buf, 10, &val);
|
||||
int result = kstrtol(buf, 10, &val);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -268,7 +268,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *da,
|
||||
struct emc2103_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
|
||||
int result = strict_strtol(buf, 10, &val);
|
||||
int result = kstrtol(buf, 10, &val);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -314,7 +314,7 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *da,
|
||||
int new_range_bits, old_div = 8 / data->fan_multiplier;
|
||||
long new_div;
|
||||
|
||||
int status = strict_strtol(buf, 10, &new_div);
|
||||
int status = kstrtol(buf, 10, &new_div);
|
||||
if (status < 0)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -388,7 +388,7 @@ static ssize_t set_fan_target(struct device *dev, struct device_attribute *da,
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
long rpm_target;
|
||||
|
||||
int result = strict_strtol(buf, 10, &rpm_target);
|
||||
int result = kstrtol(buf, 10, &rpm_target);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -434,7 +434,7 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da,
|
||||
long new_value;
|
||||
u8 conf_reg;
|
||||
|
||||
int result = strict_strtol(buf, 10, &new_value);
|
||||
int result = kstrtol(buf, 10, &new_value);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ static ssize_t set_in(struct device *dev, struct device_attribute *devattr,
|
||||
long val;
|
||||
u8 reg;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -249,7 +249,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *devattr,
|
||||
long val;
|
||||
u8 reg;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -291,7 +291,7 @@ static ssize_t set_fan(struct device *dev, struct device_attribute *devattr,
|
||||
int err;
|
||||
unsigned long val;
|
||||
|
||||
err = strict_strtoul(buf, 10, &val);
|
||||
err = kstrtoul(buf, 10, &val);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
||||
+16
-16
@@ -1333,7 +1333,7 @@ static ssize_t store_fan_full_speed(struct device *dev,
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1367,7 +1367,7 @@ static ssize_t store_fan_beep(struct device *dev, struct device_attribute
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
unsigned long val;
|
||||
|
||||
err = strict_strtoul(buf, 10, &val);
|
||||
err = kstrtoul(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1420,7 +1420,7 @@ static ssize_t store_in_max(struct device *dev, struct device_attribute
|
||||
int err;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1454,7 +1454,7 @@ static ssize_t store_in_beep(struct device *dev, struct device_attribute
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
unsigned long val;
|
||||
|
||||
err = strict_strtoul(buf, 10, &val);
|
||||
err = kstrtoul(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1524,7 +1524,7 @@ static ssize_t store_temp_max(struct device *dev, struct device_attribute
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1566,7 +1566,7 @@ static ssize_t store_temp_max_hyst(struct device *dev, struct device_attribute
|
||||
u8 reg;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1609,7 +1609,7 @@ static ssize_t store_temp_crit(struct device *dev, struct device_attribute
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1670,7 +1670,7 @@ static ssize_t store_temp_beep(struct device *dev, struct device_attribute
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
unsigned long val;
|
||||
|
||||
err = strict_strtoul(buf, 10, &val);
|
||||
err = kstrtoul(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1737,7 +1737,7 @@ static ssize_t store_pwm(struct device *dev,
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1788,7 +1788,7 @@ static ssize_t store_simple_pwm(struct device *dev,
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1835,7 +1835,7 @@ static ssize_t store_pwm_enable(struct device *dev, struct device_attribute
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1915,7 +1915,7 @@ static ssize_t store_pwm_auto_point_pwm(struct device *dev,
|
||||
int point = to_sensor_dev_attr_2(devattr)->nr;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1969,7 +1969,7 @@ static ssize_t store_pwm_auto_point_temp_hyst(struct device *dev,
|
||||
u8 reg;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -2015,7 +2015,7 @@ static ssize_t store_pwm_interpolate(struct device *dev,
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
unsigned long val;
|
||||
|
||||
err = strict_strtoul(buf, 10, &val);
|
||||
err = kstrtoul(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -2055,7 +2055,7 @@ static ssize_t store_pwm_auto_point_channel(struct device *dev,
|
||||
int err, nr = to_sensor_dev_attr_2(devattr)->index;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -2106,7 +2106,7 @@ static ssize_t store_pwm_auto_point_temp(struct device *dev,
|
||||
int point = to_sensor_dev_attr_2(devattr)->nr;
|
||||
long val;
|
||||
|
||||
err = strict_strtol(buf, 10, &val);
|
||||
err = kstrtol(buf, 10, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *da,
|
||||
struct g760a_data *data = g760a_update_client(dev);
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val))
|
||||
if (kstrtoul(buf, 10, &val))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
|
||||
@@ -224,7 +224,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr,
|
||||
int speed_index;
|
||||
int ret = count;
|
||||
|
||||
if (strict_strtoul(buf, 10, &pwm) || pwm > 255)
|
||||
if (kstrtoul(buf, 10, &pwm) || pwm > 255)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&fan_data->lock);
|
||||
@@ -257,7 +257,7 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *attr,
|
||||
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val) || val > 1)
|
||||
if (kstrtoul(buf, 10, &val) || val > 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (fan_data->pwm_enable == val)
|
||||
@@ -314,7 +314,7 @@ static ssize_t set_rpm(struct device *dev, struct device_attribute *attr,
|
||||
unsigned long rpm;
|
||||
int ret = count;
|
||||
|
||||
if (strict_strtoul(buf, 10, &rpm))
|
||||
if (kstrtoul(buf, 10, &rpm))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&fan_data->lock);
|
||||
|
||||
@@ -904,7 +904,7 @@ static ssize_t aem_set_power_period(struct device *dev,
|
||||
unsigned long temp;
|
||||
int res;
|
||||
|
||||
res = strict_strtoul(buf, 10, &temp);
|
||||
res = kstrtoul(buf, 10, &temp);
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
|
||||
+17
-17
@@ -444,7 +444,7 @@ static ssize_t set_in_min(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val) < 0)
|
||||
if (kstrtoul(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -463,7 +463,7 @@ static ssize_t set_in_max(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val) < 0)
|
||||
if (kstrtoul(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -539,7 +539,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0)
|
||||
if (kstrtol(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -557,7 +557,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0)
|
||||
if (kstrtol(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -604,7 +604,7 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
|
||||
long val;
|
||||
u8 reg;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0)
|
||||
if (kstrtol(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
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,
|
||||
long val;
|
||||
u8 reg;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0)
|
||||
if (kstrtol(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -751,7 +751,7 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr,
|
||||
int min;
|
||||
u8 old;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val) < 0)
|
||||
if (kstrtoul(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -820,7 +820,7 @@ static ssize_t set_pwm_enable(struct device *dev,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0 || val < 0 || val > 2)
|
||||
if (kstrtol(buf, 10, &val) < 0 || val < 0 || val > 2)
|
||||
return -EINVAL;
|
||||
|
||||
/* Check trip points before switching to automatic mode */
|
||||
@@ -866,7 +866,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0 || val < 0 || val > 255)
|
||||
if (kstrtol(buf, 10, &val) < 0 || val < 0 || val > 255)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -900,7 +900,7 @@ static ssize_t set_pwm_freq(struct device *dev,
|
||||
unsigned long val;
|
||||
int i;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val) < 0)
|
||||
if (kstrtoul(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* Search for the nearest available frequency */
|
||||
@@ -949,7 +949,7 @@ static ssize_t set_pwm_temp_map(struct device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0)
|
||||
if (kstrtol(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
switch (val) {
|
||||
@@ -1001,7 +1001,7 @@ static ssize_t set_auto_pwm(struct device *dev,
|
||||
int point = sensor_attr->index;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0 || val < 0 || val > 255)
|
||||
if (kstrtol(buf, 10, &val) < 0 || val < 0 || val > 255)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -1034,7 +1034,7 @@ static ssize_t set_auto_temp(struct device *dev,
|
||||
int point = sensor_attr->index;
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0 || val < -128000 || val > 127000)
|
||||
if (kstrtol(buf, 10, &val) < 0 || val < -128000 || val > 127000)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -1126,7 +1126,7 @@ static ssize_t set_fan16_min(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0)
|
||||
if (kstrtol(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -1180,7 +1180,7 @@ static ssize_t clear_intrusion(struct device *dev, struct device_attribute
|
||||
long val;
|
||||
int config;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0 || val != 0)
|
||||
if (kstrtol(buf, 10, &val) < 0 || val != 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
@@ -1231,7 +1231,7 @@ static ssize_t set_beep(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
long val;
|
||||
|
||||
if (strict_strtol(buf, 10, &val) < 0
|
||||
if (kstrtol(buf, 10, &val) < 0
|
||||
|| (val != 0 && val != 1))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1278,7 +1278,7 @@ static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr,
|
||||
struct it87_data *data = dev_get_drvdata(dev);
|
||||
unsigned long val;
|
||||
|
||||
if (strict_strtoul(buf, 10, &val) < 0)
|
||||
if (kstrtoul(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
data->vrm = val;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user