staging:iio:adis16260: Add proper range checks to write_frequency()
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 3 Aug 2013 17:41:22 +0000 (18:41 +0100)
commite4ddf314e22a512a494813636b2284d570fd7438
tree762d1dfb263fdf70d25c3fe03c596441c8c1290d
parent2a34013509065792f069c586c528480ad6196923
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>
drivers/staging/iio/gyro/adis16260_core.c
This page took 0.024777 seconds and 5 git commands to generate.