iio: accel: mma8452: claim direct mode during raw reads
authorAlison Schofield <amsfield22@gmail.com>
Tue, 11 Oct 2016 19:31:36 +0000 (12:31 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:33:54 +0000 (19:33 +0100)
commit4d9b0413e29d61e6382b613f4835118504e65e86
treee64ed3723527072620ce95bffed098d8a49b7ce1
parent4e2cf0e21f5c4792a0b21325557974ddbf111d2f
iio: accel: mma8452: claim direct mode during raw reads

Driver was checking for direct mode but not locking it.  Use
claim/release helper functions to guarantee the device stays
in direct mode during raw reads.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/mma8452.c