From: Andreas Ruprecht Date: Sun, 27 Nov 2011 22:17:42 +0000 (+0100) Subject: Staging: iio/accel: Changed data type of val in store_measurement_mode to u8 X-Git-Tag: v3.3-rc1~152^2~101^2~158 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b724ca14565747926c23af1fa1afb1848c3f448;p=pandora-kernel.git Staging: iio/accel: Changed data type of val in store_measurement_mode to u8 The code in sca3000_store_measurement_mode() uses the variable val to do bitwise operations with an int mask and or-s it into st->rx[0] which is an entry in a u8 array (see sca3000.h). This means up to now values larger than a u8 were silently ignored and just the lower 8 bits counted into the value that was written into st->rx[0]. This code will return -ERANGE if the value in buf was too large to fit into a u8. Signed-off-by: Andreas Ruprecht Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed