Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: qcom-labibb: Use disable_irq_nosync from isr

Calling the disable_irq() from irq handler might be a bad idea as
disable_irq() should wait for handlers to run. I don't see why
this wouldn't deadlock in wait_event waiting for the threaded
handler to complete.

Use disable_irq_nosync() instead.

Fixes: 390af53e04114 ("regulator: qcom-labibb: Implement short-circuit and over-current IRQs")

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Link: https://lore.kernel.org/r/f2c4c88d90bf7473e1b84b8a99b7b33d7a081764.1612249657.git.matti.vaittinen@fi.rohmeurope.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Matti Vaittinen and committed by
Mark Brown
337710b3 4288b4cc

+2 -2
+2 -2
drivers/regulator/qcom-labibb-regulator.c
··· 283 283 * Disable the interrupt temporarily, or it will fire continuously; 284 284 * we will re-enable it in the recovery worker function. 285 285 */ 286 - disable_irq(irq); 286 + disable_irq_nosync(irq); 287 287 288 288 /* Warn the user for overcurrent */ 289 289 dev_warn(vreg->dev, "Over-Current interrupt fired!\n"); ··· 536 536 * Disable the interrupt temporarily, or it will fire continuously; 537 537 * we will re-enable it in the recovery worker function. 538 538 */ 539 - disable_irq(irq); 539 + disable_irq_nosync(irq); 540 540 541 541 /* Signal out of regulation event to drivers */ 542 542 regulator_notifier_call_chain(vreg->rdev,