diff options
author | Sergiu Cuciurean <sergiu.cuciurean@analog.com> | 2020-05-14 12:19:38 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-05-16 16:29:54 +0100 |
commit | 0b2884ef7fcad881556b79828a96f359c7f1fab6 (patch) | |
tree | 1b5f5746db148aa3cd1d9690377fa3422bd65f52 /drivers/iio/dac/ad5686.h | |
parent | 9bc17892d60be3c3942f9da04b3e70b6900655cb (diff) |
iio: dac: ad5686: Replace indio_dev->mlock with own device lock
As part of the general cleanup of indio_dev->mlock, this change replaces
it with a local lock on the device's state structure.
Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac/ad5686.h')
-rw-r--r-- | drivers/iio/dac/ad5686.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/dac/ad5686.h b/drivers/iio/dac/ad5686.h index 70a779939ddb..52009b5eef88 100644 --- a/drivers/iio/dac/ad5686.h +++ b/drivers/iio/dac/ad5686.h @@ -117,6 +117,7 @@ struct ad5686_chip_info { * @pwr_down_mask: power down mask * @pwr_down_mode: current power down mode * @use_internal_vref: set to true if the internal reference voltage is used + * @lock lock to protect the data buffer during regmap ops * @data: spi transfer buffers */ @@ -130,6 +131,7 @@ struct ad5686_state { ad5686_write_func write; ad5686_read_func read; bool use_internal_vref; + struct mutex lock; /* * DMA (thus cache coherency maintenance) requires the |