[media] au0828: fix race condition that causes xc5000 to not bind for digital
authorDevin Heitmueller <[email protected]>
Tue, 7 Aug 2012 01:46:58 +0000 (22:46 -0300)
committerMauro Carvalho Chehab <[email protected]>
Thu, 9 Aug 2012 23:34:16 +0000 (20:34 -0300)
commit549ee4df1951c8a1a123e81a073d73c2e1c26588
treea200ea038a0389b6214bea7ff3b1d7d503921e1a
parent0a3dabb15ef9039188464647113398ed95400318
[media] au0828: fix race condition that causes xc5000 to not bind for digital

In some cases users would see the xc5000_attach() call failing for the
digital side of the tuner on initialization.  This is because of udev
running v4l-id while the digital side of the board is still coming up.

This is the exact same race condition which was present in em28xx (not
surprising since I copied all the locking logic from that driver when I
added analog support).  Reproduce Mauro's fix from the em28xx driver in
au0828.

Reported-by: Rick Harding <[email protected]>
Signed-off-by: Devin Heitmueller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/video/au0828/au0828-core.c
drivers/media/video/au0828/au0828-video.c