diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-07-17 18:44:00 +0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-08-03 21:41:22 +0400 |
commit | e4ddf314e22a512a494813636b2284d570fd7438 (patch) | |
tree | 762d1dfb263fdf70d25c3fe03c596441c8c1290d /drivers/iio/gyro/Makefile | |
parent | 2a34013509065792f069c586c528480ad6196923 (diff) | |
download | linux-e4ddf314e22a512a494813636b2284d570fd7438.tar.xz |
staging:iio:adis16260: Add proper range checks to write_frequency()
A negative sampling frequency is obviously invalid, so use kstrtouint() instead
of strict_strtoul. Also when setting a sampling frequency smaller than the
minimum supported frequency set the frequency to the minimum supported frequency
instead of just cutting off the upper bits of the raw register value.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/gyro/Makefile')
0 files changed, 0 insertions, 0 deletions