staging: iio: ad9832: replace mlock with driver private lock
authorAlison Schofield <amsfield22@gmail.com>
Thu, 9 Mar 2017 20:46:24 +0000 (12:46 -0800)
committerJonathan Cameron <jic23@kernel.org>
Mon, 13 Mar 2017 21:20:24 +0000 (21:20 +0000)
commit4b88e516a6a304eac79caa81f0bc5f712894cd69
tree8a7a7beae4b42c32d7c5881a4275991c45f4930a
parent0a124e98f4a5b9b03950af02a57a067ccc1016c1
staging: iio: ad9832: replace mlock with driver private lock

The IIO subsystem is redefining iio_dev->mlock to be used by
the IIO core only for protecting device operating mode changes.
ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes.

In this driver, mlock was being used to protect hardware state
changes.  Replace it with a lock in the devices global data.

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