The patch number 9942 was added via Hans Verkuil <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
[email protected]
------
From: Hans Verkuil <[email protected]>
v4l2-dev: check for parent device in get_index.
get_index requires a valid parent device in order to discover which
indices are in use. Some drivers (e.g. pvrusb2) do not set the parent
device. In that case just return 0.
Priority: normal
Signed-off-by: Hans Verkuil <[email protected]>
---
linux/drivers/media/video/v4l2-dev.c | 4 ++++
1 file changed, 4 insertions(+)
diff -r f6825894872e -r 1bda6b26e455 linux/drivers/media/video/v4l2-dev.c
--- a/linux/drivers/media/video/v4l2-dev.c Fri Dec 19 11:36:46 2008 +0100
+++ b/linux/drivers/media/video/v4l2-dev.c Fri Dec 19 13:10:56 2008 +0100
@@ -194,6 +194,10 @@ static int get_index(struct video_device
return -EINVAL;
}
+ /* Some drivers do not set the parent. In that case always return 0. */
+ if (vdev->parent == NULL)
+ return 0;
+
for (i = 0; i < VIDEO_NUM_DEVICES; i++) {
if (video_device[i] != NULL &&
video_device[i] != vdev &&
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/1bda6b26e455de73d0e34cfa1ca48d0ee9323530
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits