iio: Use strict_strtouint instead of kstrtoul
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 18 Oct 2012 13:47:00 +0000 (14:47 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 19 Oct 2012 17:46:50 +0000 (18:46 +0100)
strict_strto* has been deprecated in favor of kstrto*. Use strict_strtouint
respective strict_strtoint, since that is what the functions we pass the
converted values to expect.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-event.c

index d4ad374..722a83f 100644 (file)
@@ -371,12 +371,12 @@ ssize_t iio_buffer_write_length(struct device *dev,
                                const char *buf,
                                size_t len)
 {
-       int ret;
-       ulong val;
        struct iio_dev *indio_dev = dev_to_iio_dev(dev);
        struct iio_buffer *buffer = indio_dev->buffer;
+       unsigned int val;
+       int ret;
 
-       ret = strict_strtoul(buf, 10, &val);
+       ret = kstrtouint(buf, 10, &val);
        if (ret)
                return ret;
 
index fa6543b..857e630 100644 (file)
@@ -239,13 +239,13 @@ static ssize_t iio_ev_value_store(struct device *dev,
 {
        struct iio_dev *indio_dev = dev_to_iio_dev(dev);
        struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
-       unsigned long val;
+       int val;
        int ret;
 
        if (!indio_dev->info->write_event_value)
                return -EINVAL;
 
-       ret = strict_strtoul(buf, 10, &val);
+       ret = kstrtoint(buf, 10, &val);
        if (ret)
                return ret;