[media] em28xx: Fix em28xx deplock
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 27 Dec 2013 16:01:04 +0000 (13:01 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 5 Jan 2014 10:58:49 +0000 (08:58 -0200)
commit54a2a84ea9e8640b4f1df4e222e305d03bb64065
tree0267199272444b3ae7d66534dc71c0dfbdb56e87
parentce67943e2dfd3bc8b7e86b428fc0dfc568730971
[media] em28xx: Fix em28xx deplock

When em28xx extensions are loaded/removed, there are two locks:

a single static em28xx_devlist_mutex that registers each extension
and the struct em28xx dev->lock.

When extensions are registered, em28xx_devlist_mutex is taken first,
and then dev->lock.

Be sure that, when extensions are being removed, the same order
will be used.

Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-core.c