]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask
authorCristina Ciocan <cristina.ciocan@intel.com>
Tue, 11 Nov 2014 14:07:42 +0000 (16:07 +0200)
committerZefan Li <lizefan@huawei.com>
Tue, 14 Apr 2015 09:33:35 +0000 (17:33 +0800)
commite1962953875c97e898c818eddb4b1bbb2cdc9a01
treeab44fe366d195eeeaf5de31d23f3c8e60f279690
parentf3234664145be98b3703dcaaefedb64cb61924e9
iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask

commit ccf54555da9a5e91e454b909ca6a5303c7d6b910 upstream.

The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask
in order to retrieve it, that is 0x7F, not 0xCF as it is now.

Fixes: ade7ef7ba (staging:iio: Differential channel handling)
Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/staging/iio/events.h