diff options
author | Ramona Bolboaca <ramona.bolboaca@analog.com> | 2022-11-22 11:27:49 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-11-23 23:37:50 +0300 |
commit | 99c05e4283a19a02a256f14100ca4ec3b2da3f62 (patch) | |
tree | 83ddb65046e85f82a06029f10fdca2e501eb2d63 /rust | |
parent | 99b43a15915543484d7538cb32f49901e802628a (diff) | |
download | linux-99c05e4283a19a02a256f14100ca4ec3b2da3f62.tar.xz |
iio: adis: add '__adis_enable_irq()' implementation
Add '__adis_enable_irq()' implementation which is the unlocked
version of 'adis_enable_irq()'.
Call '__adis_enable_irq()' instead of 'adis_enable_irq()' from
'__adis_intial_startup()' to keep the expected unlocked functionality.
This fix is needed to remove a deadlock for all devices which are
using 'adis_initial_startup()'. The deadlock occurs because the
same mutex is acquired twice, without releasing it.
The mutex is acquired once inside 'adis_initial_startup()', before
calling '__adis_initial_startup()', and once inside
'adis_enable_irq()', which is called by '__adis_initial_startup()'.
The deadlock is removed by calling '__adis_enable_irq()', instead of
'adis_enable_irq()' from within '__adis_initial_startup()'.
Fixes: b600bd7eb3335 ("iio: adis: do not disabe IRQs in 'adis_init()'")
Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-2-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions