OSDN Git Service

staging: iio: ad7280: Replace mlock with driver private lock
authorGargi Sharma <gs051095@gmail.com>
Fri, 17 Mar 2017 07:59:30 +0000 (13:29 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sun, 19 Mar 2017 11:11:37 +0000 (11:11 +0000)
commitdba968c4fea0f9368e709966666d6e35dfe05e62
treec4af2ec6fa5d3263554510b144ec3c8bda91cc9d
parent2b7cb7bed6e209a1b1560fe288087f84614cc793
staging: iio: ad7280: 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: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7280a.c