diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2015-07-24 16:28:05 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-08-02 20:38:22 +0300 |
commit | ae067cb68d2ef42d4a84eeaf07411fe2936f48c4 (patch) | |
tree | 07d69f6e0d1ded397d1d3ea89bb08bbb2f0ffd42 /init | |
parent | 2854c098e222a706b91cc83b4a91dbfd97212765 (diff) | |
download | linux-ae067cb68d2ef42d4a84eeaf07411fe2936f48c4.tar.xz |
tools: iio: fix mask for 32 bit sensor data
When the the sensor data uses 32 bits out of 32, generic_buffer prints
the value 0 for all data read.
In this case, the mask is shifted 32 bits, which is beyond the size of
an integer. This will lead to the mask always being 0. Before printing,
the mask is applied to the raw value, thus generating a final value of 0.
Fix the mask by shifting a 64 bit value instead of an integer.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions