OSDN Git Service

iio: imu: adis16400: rework locks using ADIS library's state lock
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 22 Nov 2019 13:24:18 +0000 (15:24 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 23 Nov 2019 12:14:59 +0000 (12:14 +0000)
commitce476cd18aaea91ee31b991774553ba5239c9ee2
tree7689ca1f508ad4c030ad95a7577925b19ba12c4d
parentc5485a5d6a5f7d00ca4aba6698526c5ae3f2a1a2
iio: imu: adis16400: rework locks using ADIS library's state lock

This change removes the use of indio_dev's mlock in favor using the state
lock from the ADIS library.

The set_freq() & get_freq() hooks are unlocked, so they require specific
locking. That is because in some cases the get_freq() hook is used in
combination with adis16400_set_filter().

In cases where only one read/write is done, the functions that hold the
state lock are used.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16400.c