diff options
Diffstat (limited to 'linux/drivers/media/video/v4l2-dev.c')
-rw-r--r-- | linux/drivers/media/video/v4l2-dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linux/drivers/media/video/v4l2-dev.c b/linux/drivers/media/video/v4l2-dev.c index d7caa4bc3..e1fdd6595 100644 --- a/linux/drivers/media/video/v4l2-dev.c +++ b/linux/drivers/media/video/v4l2-dev.c @@ -241,7 +241,7 @@ static int get_index(struct video_device *vdev, int num) for (i = 0; i < VIDEO_NUM_DEVICES; i++) { if (video_device[i] != NULL && video_device[i] != vdev && - video_device[i]->dev == vdev->dev) { + video_device[i]->parent == vdev->parent) { used |= 1 << video_device[i]->index; } } @@ -366,13 +366,13 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) - if (vfd->dev) - vfd->class_dev.dev = vfd->dev; + if (vfd->parent) + vfd->class_dev.dev = vfd->parent; sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base); ret = class_device_register(&vfd->class_dev); #else - if (vfd->dev) - vfd->class_dev.parent = vfd->dev; + if (vfd->parent) + vfd->class_dev.parent = vfd->parent; sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); ret = device_register(&vfd->class_dev); #endif |