[media] radio-mr800: fix locking order
Don't hold the lock before unregistering the device, since when the
device is unregistered the datastruct containing the lock may be freed
(if the refcount went to 0).
Also fixed the framework documentation that erroneously suggested the
wrong locking order as well.
Reported-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index a128e01..f22f35c 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -488,7 +488,7 @@
to access the device node while the first process is waiting for something.
The implementation of a hotplug disconnect should also take the lock before
-calling v4l2_device_disconnect and video_unregister_device.
+calling v4l2_device_disconnect.
video_device registration
-------------------------