commit | e4ddf314e22a512a494813636b2284d570fd7438 | [log] [tgz] |
---|---|---|
author | Lars-Peter Clausen <lars@metafoo.de> | Wed Jul 17 15:44:00 2013 +0100 |
committer | Jonathan Cameron <jic23@kernel.org> | Sat Aug 03 18:41:22 2013 +0100 |
tree | 762d1dfb263fdf70d25c3fe03c596441c8c1290d | |
parent | 2a34013509065792f069c586c528480ad6196923 [diff] |
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>