[media] em28xx: fix deadlock when unplugging and replugging a DVB adapter
authorChris Rankin <rankincj@yahoo.com>
Sat, 24 Sep 2011 19:54:58 +0000 (16:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 25 Sep 2011 12:47:59 +0000 (09:47 -0300)
commitb868a537b675eed2ba84bbeca4c8557ebf9e0156
tree42a7bd386be97907cbbc3243d5c2cdc3fc0bb2a1
parent4a6c4a9567aed23cf7e8134c63f3176a57e5572b
[media] em28xx: fix deadlock when unplugging and replugging a DVB adapter

This fixes the deadlock that occurs with either multiple PCTV 290e adapters or when a single PCTV 290e adapter is replugged.

For DVB devices, the device lock must now *not* be held when adding/removing either a device or an extension to the respective lists. (Because em28xx_init_dvb() will want to take the lock instead).

Conversely, for Audio-Only devices, the device lock *must* be held when adding/removing either a device or an extension to the respective lists.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-cards.c