[media] em28xx-audio: flush work at .fini
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 13 Jan 2014 14:32:00 +0000 (11:32 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 14 Jan 2014 16:44:11 +0000 (14:44 -0200)
As a pending action might be still there at the work
thread, flush it.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-audio.c

index 74575e0ed41b2ef5bee2d1f4a71044d09a1755b0..1563f71a5ea2e590ddb6a8bdb71e9e5e67737f90 100644 (file)
@@ -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) {