iio: magnetometer: mag3110: claim direct mode during raw writes
authorAlison Schofield <amsfield22@gmail.com>
Fri, 20 Jan 2017 20:39:32 +0000 (12:39 -0800)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 Jan 2017 12:20:40 +0000 (12:20 +0000)
commit80dea21f95a4672cce545f48dc2ca500b69a2584
treeb862581cff4ad7e56196d06ea170cedb23cc4ddb
parent0bf1a2aac6c5ea30eca6d99791037a7b7abd8d76
iio: magnetometer: mag3110: claim direct mode during raw writes

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 writes.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/mag3110.c