iio: trigger: stm32-timer: fix get trigger mode
authorFabrice Gasnier <fabrice.gasnier@st.com>
Thu, 3 Aug 2017 09:22:17 +0000 (11:22 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 20 Aug 2017 14:21:47 +0000 (15:21 +0100)
commita359bb2a55f384bb93349ddf9d30b20b37e02e8a
tree35143eabceeb0d608417a179bb07c2964d818afa
parentfdd0d32eb95f135041236a6885d9006315aa9a1d
iio: trigger: stm32-timer: fix get trigger mode

Fix reading trigger mode, when other bit-fields are set. SMCR register
value must be masked to read SMS (slave mode selection) only.

Fixes: 9eba381 ("iio: make stm32 trigger driver use
INDIO_HARDWARE_TRIGGERED mode")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/trigger/stm32-timer-trigger.c