The checkpatch.pl script marks the function "strict_strtol" as obsolete and suggests replacing it with "kstrtol". Signed-off-by: Andreas Ruprecht <rupran@xxxxxxxxxxxx> --- [v2] : Changed type of val in adis16220_write_16bit() to u16 to only succeed with in-range numbers. In lis3102dq_write_frequency(): changed the type of val to unsigned long as proposed by Dan Carpenter. --- drivers/staging/iio/accel/adis16220_core.c | 4 ++-- drivers/staging/iio/accel/lis3l02dq_core.c | 4 ++-- drivers/staging/iio/accel/sca3000_core.c | 6 +++--- drivers/staging/iio/accel/sca3000_ring.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/iio/accel/adis16220_core.c b/drivers/staging/iio/accel/adis16220_core.c index 6d4503d..bb72eb3 100644 --- a/drivers/staging/iio/accel/adis16220_core.c +++ b/drivers/staging/iio/accel/adis16220_core.c @@ -167,9 +167,9 @@ static ssize_t adis16220_write_16bit(struct device *dev, struct iio_dev *indio_dev = dev_get_drvdata(dev); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; - long val; + u16 val; - ret = strict_strtol(buf, 10, &val); + ret = kstrtou16(buf, 10, &val); if (ret) goto error_ret; ret = adis16220_spi_write_reg_16(indio_dev, this_attr->address, val); diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index 559545a..5566809 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c @@ -331,11 +331,11 @@ static ssize_t lis3l02dq_write_frequency(struct device *dev, size_t len) { struct iio_dev *indio_dev = dev_get_drvdata(dev); - long val; + unsigned long val; int ret; u8 t; - ret = strict_strtol(buf, 10, &val); + ret = kstrtoul(buf, 10, &val); if (ret) return ret; diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index a44a705..6a2721b 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c @@ -385,7 +385,7 @@ sca3000_store_measurement_mode(struct device *dev, long val; mutex_lock(&st->lock); - ret = strict_strtol(buf, 10, &val); + ret = kstrtol(buf, 10, &val); if (ret) goto error_ret; ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_MODE, 1); @@ -617,7 +617,7 @@ static ssize_t sca3000_set_frequency(struct device *dev, int ctrlval; long val; - ret = strict_strtol(buf, 10, &val); + ret = kstrtol(buf, 10, &val); if (ret) return ret; @@ -927,7 +927,7 @@ static ssize_t sca3000_set_free_fall_mode(struct device *dev, u8 protect_mask = SCA3000_FREE_FALL_DETECT; mutex_lock(&st->lock); - ret = strict_strtol(buf, 10, &val); + ret = kstrtol(buf, 10, &val); if (ret) goto error_ret; diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c index 4a9a01d..04275e4 100644 --- a/drivers/staging/iio/accel/sca3000_ring.c +++ b/drivers/staging/iio/accel/sca3000_ring.c @@ -188,7 +188,7 @@ static ssize_t sca3000_set_ring_int(struct device *dev, int ret; mutex_lock(&st->lock); - ret = strict_strtol(buf, 10, &val); + ret = kstrtol(buf, 10, &val); if (ret) goto error_ret; ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_INT_MASK, 1); -- 1.7.5.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel