diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 14:03:04 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 17:43:20 +0200 |
commit | 005759613b95264fba9138010f112bc138c857c2 (patch) | |
tree | 43fa1d5a9035c51ab822906b5114885ac35707df /drivers/media/video | |
parent | V4L/DVB (10987): cx23885: fix crash on non-netup cards (diff) | |
download | linux-005759613b95264fba9138010f112bc138c857c2.tar.xz linux-005759613b95264fba9138010f112bc138c857c2.zip |
V4L/DVB (10988): v4l2-dev: use parent field if the v4l2_device has no parent set.
Normally the parent device of v4l2_device is used as the video device
node's parent. But if it was not set, then use the parent field in the
video_device struct.
This is needed in the cx88 driver, which has one core v4l2_device but
creates multiple pci devices (one each for raw and mpeg video).
So you cannot associate the core v4l2_device with a particular PCI device,
but you can do that for each video_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 64c638ecdd4b..cdc8ce3c4e56 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -395,7 +395,7 @@ int video_register_device_index(struct video_device *vdev, int type, int nr, vdev->vfl_type = type; vdev->cdev = NULL; - if (vdev->v4l2_dev) + if (vdev->v4l2_dev && vdev->v4l2_dev->dev) vdev->parent = vdev->v4l2_dev->dev; /* Part 2: find a free minor, kernel number and device index. */ |