diff options
Diffstat (limited to 'drivers/media/platform/soc_camera/soc_camera.c')
-rw-r--r-- | drivers/media/platform/soc_camera/soc_camera.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index fcdd8734f3ec..5099eebf994d 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c | |||
@@ -524,7 +524,7 @@ static int soc_camera_open(struct file *file) | |||
524 | return -ENODEV; | 524 | return -ENODEV; |
525 | } | 525 | } |
526 | 526 | ||
527 | icd = dev_get_drvdata(vdev->parent); | 527 | icd = video_get_drvdata(vdev); |
528 | ici = to_soc_camera_host(icd->parent); | 528 | ici = to_soc_camera_host(icd->parent); |
529 | 529 | ||
530 | ret = try_module_get(ici->ops->owner) ? 0 : -ENODEV; | 530 | ret = try_module_get(ici->ops->owner) ? 0 : -ENODEV; |
@@ -1477,7 +1477,7 @@ static int video_dev_create(struct soc_camera_device *icd) | |||
1477 | 1477 | ||
1478 | strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name)); | 1478 | strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name)); |
1479 | 1479 | ||
1480 | vdev->parent = icd->pdev; | 1480 | vdev->v4l2_dev = &ici->v4l2_dev; |
1481 | vdev->fops = &soc_camera_fops; | 1481 | vdev->fops = &soc_camera_fops; |
1482 | vdev->ioctl_ops = &soc_camera_ioctl_ops; | 1482 | vdev->ioctl_ops = &soc_camera_ioctl_ops; |
1483 | vdev->release = video_device_release; | 1483 | vdev->release = video_device_release; |
@@ -1500,6 +1500,7 @@ static int soc_camera_video_start(struct soc_camera_device *icd) | |||
1500 | if (!icd->parent) | 1500 | if (!icd->parent) |
1501 | return -ENODEV; | 1501 | return -ENODEV; |
1502 | 1502 | ||
1503 | video_set_drvdata(icd->vdev, icd); | ||
1503 | ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1); | 1504 | ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1); |
1504 | if (ret < 0) { | 1505 | if (ret < 0) { |
1505 | dev_err(icd->pdev, "video_register_device failed: %d\n", ret); | 1506 | dev_err(icd->pdev, "video_register_device failed: %d\n", ret); |