Hans de Goede 8d2d7bcdc1
ASoC: rt5651: Fix workqueue cancel vs irq free race on remove
On removal we must free the IRQ *before* cancelling the jack-detect work,
so that the jack-detect work cannot be rescheduled by the IRQ.

Before this commit we were cancelling the jack-detect work from the
driver remove callback, while relying on devm to free the IRQ, which
happens after the remove callback.

This is the wrong order. This commit uses a devm-action to register
a devm callback which cancels the work, before requesting the IRQ
(devm tears things down in reverse order). This also allows us to
remove the now empty remove driver callback.

Cc: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-10 18:49:24 +01:00
..
2018-07-03 16:15:32 +01:00
2018-07-09 12:15:30 +01:00
2018-01-10 16:42:10 +00:00
2018-05-17 15:46:22 +09:00
2018-03-14 09:35:29 -07:00
2018-05-09 18:38:23 +09:00