Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
948ad205 45259859

+5 -5
+3 -3
drivers/iio/industrialio-buffer.c
··· 371 371 const char *buf, 372 372 size_t len) 373 373 { 374 - int ret; 375 - ulong val; 376 374 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 377 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 380 if (ret) 381 381 return ret; 382 382
+2 -2
drivers/iio/industrialio-event.c
··· 239 239 { 240 240 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 241 241 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 242 - unsigned long val; 242 + int val; 243 243 int ret; 244 244 245 245 if (!indio_dev->info->write_event_value) 246 246 return -EINVAL; 247 247 248 - ret = strict_strtoul(buf, 10, &val); 248 + ret = kstrtoint(buf, 10, &val); 249 249 if (ret) 250 250 return ret; 251 251