Browse Source

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

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

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab 11 years ago
parent
commit
b49eb2bd71
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/media/usb/em28xx/em28xx-audio.c

+ 2 - 0
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) {