From: Lars-Peter Clausen Date: Wed, 17 Jul 2013 14:44:00 +0000 (+0100) Subject: staging:iio:adis16260: Add proper range checks to write_frequency() X-Git-Tag: v3.12-rc1~183^2~322^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4ddf314e22a512a494813636b2284d570fd7438;p=pandora-kernel.git 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 Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed