diff options
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 2dd82b16bc35..9cc2cf1a1c93 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -201,7 +201,7 @@ static int get_index(struct video_device *vdev, int num) | |||
201 | for (i = 0; i < VIDEO_NUM_DEVICES; i++) { | 201 | for (i = 0; i < VIDEO_NUM_DEVICES; i++) { |
202 | if (video_device[i] != NULL && | 202 | if (video_device[i] != NULL && |
203 | video_device[i] != vdev && | 203 | video_device[i] != vdev && |
204 | video_device[i]->dev == vdev->dev) { | 204 | video_device[i]->parent == vdev->parent) { |
205 | used |= 1 << video_device[i]->index; | 205 | used |= 1 << video_device[i]->index; |
206 | } | 206 | } |
207 | } | 207 | } |
@@ -323,8 +323,8 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, | |||
323 | memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); | 323 | memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); |
324 | vfd->class_dev.class = &video_class; | 324 | vfd->class_dev.class = &video_class; |
325 | vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); | 325 | vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); |
326 | if (vfd->dev) | 326 | if (vfd->parent) |
327 | vfd->class_dev.parent = vfd->dev; | 327 | vfd->class_dev.parent = vfd->parent; |
328 | sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); | 328 | sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); |
329 | ret = device_register(&vfd->class_dev); | 329 | ret = device_register(&vfd->class_dev); |
330 | if (ret < 0) { | 330 | if (ret < 0) { |