diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 14:03:04 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 14:03:04 +0100 |
commit | e0880a34f81b5282fa1be0f8872664992db9cdfd (patch) | |
tree | b44eed765978f6f7e3a90b2238846e298a15cf37 /linux/drivers | |
parent | 01cbd287bd3f93c3402e8bd46d5c92aec838da2e (diff) | |
download | mediapointer-dvb-s2-e0880a34f81b5282fa1be0f8872664992db9cdfd.tar.gz mediapointer-dvb-s2-e0880a34f81b5282fa1be0f8872664992db9cdfd.tar.bz2 |
v4l2-dev: use parent field if the v4l2_device has no parent set.
From: Hans Verkuil <hverkuil@xs4all.nl>
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.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/v4l2-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/v4l2-dev.c b/linux/drivers/media/video/v4l2-dev.c index 110cde853..5e9b46c21 100644 --- a/linux/drivers/media/video/v4l2-dev.c +++ b/linux/drivers/media/video/v4l2-dev.c @@ -433,7 +433,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. */ |