diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-10-18 09:47:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-10-19 13:46:50 -0400 |
commit | 948ad20504894436c008c8a50f74e277edeff9a1 (patch) | |
tree | 3c9625afdb855cb6ee6fe1538da4e615fe3041f2 /drivers/iio | |
parent | 45259859492812c8b700ae1d157be01a8d2babfe (diff) |
iio: Use strict_strtouint instead of kstrtoul
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>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/industrialio-buffer.c | 6 | ||||
-rw-r--r-- | drivers/iio/industrialio-event.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index d4ad37455a67..722a83fd8d85 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c | |||
@@ -371,12 +371,12 @@ ssize_t iio_buffer_write_length(struct device *dev, | |||
371 | const char *buf, | 371 | const char *buf, |
372 | size_t len) | 372 | size_t len) |
373 | { | 373 | { |
374 | int ret; | ||
375 | ulong val; | ||
376 | struct iio_dev *indio_dev = dev_to_iio_dev(dev); | 374 | struct iio_dev *indio_dev = dev_to_iio_dev(dev); |
377 | struct iio_buffer *buffer = indio_dev->buffer; | 375 | struct iio_buffer *buffer = indio_dev->buffer; |
376 | unsigned int val; | ||
377 | int ret; | ||
378 | 378 | ||
379 | ret = strict_strtoul(buf, 10, &val); | 379 | ret = kstrtouint(buf, 10, &val); |
380 | if (ret) | 380 | if (ret) |
381 | return ret; | 381 | return ret; |
382 | 382 | ||
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index fa6543bf6731..857e6306c5c3 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c | |||
@@ -239,13 +239,13 @@ static ssize_t iio_ev_value_store(struct device *dev, | |||
239 | { | 239 | { |
240 | struct iio_dev *indio_dev = dev_to_iio_dev(dev); | 240 | struct iio_dev *indio_dev = dev_to_iio_dev(dev); |
241 | struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); | 241 | struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); |
242 | unsigned long val; | 242 | int val; |
243 | int ret; | 243 | int ret; |
244 | 244 | ||
245 | if (!indio_dev->info->write_event_value) | 245 | if (!indio_dev->info->write_event_value) |
246 | return -EINVAL; | 246 | return -EINVAL; |
247 | 247 | ||
248 | ret = strict_strtoul(buf, 10, &val); | 248 | ret = kstrtoint(buf, 10, &val); |
249 | if (ret) | 249 | if (ret) |
250 | return ret; | 250 | return ret; |
251 | 251 | ||