From: Andreas Ruprecht Date: Sun, 27 Nov 2011 22:17:41 +0000 (+0100) Subject: Staging: iio/accel: Changed data type for val to unsigned long in write_frequency X-Git-Tag: v3.3-rc1~152^2~101^2~159 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=359f9caa4df27ca0546a787d086f4c06306300b6;p=pandora-kernel.git Staging: iio/accel: Changed data type for val to unsigned long in write_frequency In lis3102dq_write_frequency() we used a long variable to store the value parsed from the char* buffer buf, as there only was a strict_strtol() function to parse values. Now we have got kstrto* which allows us to convert to the right data type in most cases. In this particular function we want to write a frequency value, and it doesn't make sense to allow negative values here (as Dan Carpenter pointed out in a previous email). This means we can now parse the value into an unsigned long and get an error for invalid (e.g. negative) values. Signed-off-by: Andreas Ruprecht Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed