iio: gyro: itg3200_core: do not use internal iio_dev lock
authorNuno Sá <nuno.sa@analog.com>
Tue, 4 Oct 2022 13:49:05 +0000 (15:49 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:43:58 +0000 (19:43 +0000)
commit3cc36cabc669fffa7f04931e3dd25dc47314ec06
treeba159e92f9e4d56a20124d1b35afe5ce5d7ccf31
parentd711a5a7eff4855deb0e2c2663e679dc205e2d9f
iio: gyro: itg3200_core: do not use internal iio_dev lock

The iio_device lock is only meant for internal use. Hence define a
device local lock to protect against concurrent accesses.

While at it, properly include "mutex.h" for mutex related APIs.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221004134909.1692021-13-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/gyro/itg3200_core.c
include/linux/iio/gyro/itg3200.h