[PATCH] [media] em28xx-audio: flush work at .fini

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As a pending action might be still there at the work
thread, flush it.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@xxxxxxxxxxx>
---
 drivers/media/usb/em28xx/em28xx-audio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index 74575e0ed41b..1563f71a5ea2 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -967,6 +967,8 @@ static int em28xx_audio_fini(struct em28xx *dev)
 	em28xx_info("Closing audio extension");
 
 	snd_card_disconnect(dev->adev.sndcard);
+	flush_work(&dev->wq_trigger);
+
 	em28xx_audio_free_urb(dev);
 
 	if (dev->adev.sndcard) {
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux