iio: accel: mma8452: claim direct mode during write raw
authorJonathan Cameron <jic23@kernel.org>
Sat, 15 Oct 2016 14:55:06 +0000 (15:55 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:33:54 +0000 (19:33 +0100)
commit79de2ee469aaef0afb25dde7d65d7fbc91600573
tree24d68067934ecd1891b9c6b9683eb8e94abfcf8a
parent4d9b0413e29d61e6382b613f4835118504e65e86
iio: accel: mma8452: claim direct mode during write raw

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

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