mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
msm: camera: common: Add device caps for full devices during probe
The v4l2 registration requires all devices that are not subdevs
to have device caps field to be non zero. Add device caps for
CRM and SYNC devices during probe.
CRs-Fixed: 2582994
Change-Id: I804e7bc00d597debc39d1f71259cf607c60ed069
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
This commit is contained in:
parent
75f72b30a7
commit
42021c8b76
2 changed files with 12 additions and 2 deletions
|
|
@ -555,9 +555,14 @@ static int cam_video_device_setup(void)
|
|||
g_dev.video->ioctl_ops = &g_cam_ioctl_ops;
|
||||
g_dev.video->minor = -1;
|
||||
g_dev.video->vfl_type = VFL_TYPE_GRABBER;
|
||||
g_dev.video->device_caps |= V4L2_CAP_VIDEO_CAPTURE;
|
||||
rc = video_register_device(g_dev.video, VFL_TYPE_GRABBER, -1);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_CRM,
|
||||
"video device registration failure rc = %d, name = %s, device_caps = %d",
|
||||
rc, g_dev.video->name, g_dev.video->device_caps);
|
||||
goto v4l2_fail;
|
||||
}
|
||||
|
||||
rc = media_entity_pads_init(&g_dev.video->entity, 0, NULL);
|
||||
if (rc)
|
||||
|
|
|
|||
|
|
@ -1053,11 +1053,16 @@ static int cam_sync_probe(struct platform_device *pdev)
|
|||
sync_dev->vdev->fops = &cam_sync_v4l2_fops;
|
||||
sync_dev->vdev->ioctl_ops = &g_cam_sync_ioctl_ops;
|
||||
sync_dev->vdev->minor = -1;
|
||||
sync_dev->vdev->device_caps |= V4L2_CAP_VIDEO_CAPTURE;
|
||||
sync_dev->vdev->vfl_type = VFL_TYPE_GRABBER;
|
||||
rc = video_register_device(sync_dev->vdev,
|
||||
VFL_TYPE_GRABBER, -1);
|
||||
if (rc < 0)
|
||||
if (rc < 0) {
|
||||
CAM_ERR(CAM_SYNC,
|
||||
"video device registration failure rc = %d, name = %s, device_caps = %d",
|
||||
rc, sync_dev->vdev->name, sync_dev->vdev->device_caps);
|
||||
goto v4l2_fail;
|
||||
}
|
||||
|
||||
cam_sync_init_entity(sync_dev);
|
||||
video_set_drvdata(sync_dev->vdev, sync_dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue