commit | 2544ea7bd075948dcb0bdebfae739eb235c69728 | [log] [tgz] |
---|---|---|
author | Sergiu Cuciurean <sergiu.cuciurean@analog.com> | Wed Sep 16 12:23:49 2020 +0300 |
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | Wed Sep 16 18:51:40 2020 +0100 |
tree | 1663e5de288a9d4b0d88cb9f3350a459f9ec2bf5 | |
parent | d3e0e14d65178d73ee0f991934c5fa89737e3922 [diff] |
iio: stm32-dac: 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. The lock protects against potential races when reading the CR reg and then updating, so that the state of pm_runtime is consistent between the two operations. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@st.com> Link: https://lore.kernel.org/r/20200916092349.75647-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>