iio: magnetometer: mag3110: claim direct mode during raw reads
authorAlison Schofield <amsfield22@gmail.com>
Thu, 18 Aug 2016 16:09:00 +0000 (09:09 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sun, 21 Aug 2016 18:37:35 +0000 (19:37 +0100)
commit197399dcd7726b6b86d2c46700c9be05f5b85425
treee79499b55ff42ad6cbcdc9d9dc65bc233762ef5e
parentd1682a9a7a2eac4b3b7541f25848f7b1d7286918
iio: magnetometer: mag3110: 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>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/mag3110.c