diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2012-01-04 20:58:52 +0100 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-01-05 08:19:34 -0800 |
commit | 179c4fdb565dd2157e5dfe89318b74868e3b523d (patch) | |
tree | 66c8b705260562df090a5061af2be9c80b71cd4b /drivers | |
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')
37 files changed, 181 insertions, 181 deletions
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c index 66f67293341..522860ab6ce 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -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; diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c index b2cacbe707a..ceb24a36517 100644 --- a/drivers/hwmon/adcxx.c +++ b/drivers/hwmon/adcxx.c @@ -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)) diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c index 0683e6be662..e6291dafa4c 100644 --- a/drivers/hwmon/adm1031.c +++ b/drivers/hwmon/adm1031.c @@ -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; diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c index 9e234b981b8..3f63f5f9741 100644 --- a/drivers/hwmon/adm9240.c +++ b/drivers/hwmon/adm9240.c @@ -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); diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c index 5cc3e3784b4..5b02f7a9101 100644 --- a/drivers/hwmon/adt7411.c +++ b/drivers/hwmon/adt7411.c @@ -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; diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c index 2af0c7b6b4e..7a1494846cf 100644 --- a/drivers/hwmon/adt7462.c +++ b/drivers/hwmon/adt7462.c @@ -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); diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index c6d1ce059ae..5e10c79f2df 100644 --- a/drivers/hwmon/adt7470.c +++ b/drivers/hwmon/adt7470.c @@ -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); diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index b5fcd87931c..7dab3547fee 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c @@ -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; diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c index 4033974d1bb..89a6b9da0ec 100644 --- a/drivers/hwmon/amc6821.c +++ b/drivers/hwmon/amc6821.c @@ -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; diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 4c0743660e9..b9895531240 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -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; diff --git a/drivers/hwmon/asc7621.c b/drivers/hwmon/asc7621.c index d2596cec18b..3efd3244998 100644 --- a/drivers/hwmon/asc7621.c +++ b/drivers/hwmon/asc7621.c @@ -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++) { diff --git a/drivers/hwmon/ds620.c b/drivers/hwmon/ds620.c index 225ae4f3658..300c3d4d67d 100644 --- a/drivers/hwmon/ds620.c +++ b/drivers/hwmon/ds620.c @@ -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; diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index cd2a6e437ae..270ffab711c 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c @@ -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); diff --git a/drivers/hwmon/emc2103.c b/drivers/hwmon/emc2103.c index af914ad93ec..848a2b0bc83 100644 --- a/drivers/hwmon/emc2103.c +++ b/drivers/hwmon/emc2103.c @@ -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; diff --git a/drivers/hwmon/emc6w201.c b/drivers/hwmon/emc6w201.c index 0064432f361..6ebb9b738c9 100644 --- a/drivers/hwmon/emc6w201.c +++ b/drivers/hwmon/emc6w201.c @@ -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; diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 59dd881c71d..e50305819f0 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -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); |