aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-07-28 12:57:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-03 16:27:52 -0400
commitb0050e41bad1789ab5aeec15c3687a73e075b955 (patch)
tree14c01cd55af11b47fa32213ed99026dc20b1ab9a /drivers
parente1db704326c9a5164da4e24b01e487c0be687fa2 (diff)
[media] V4L: soc-camera: camera client operations no longer compulsory
With the transition of all soc-camera host drivers to use V4L2 subdevice .[gs]_mbus_config() operations, soc-camera client operations no longer have to be compulsory. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/soc_camera.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 8b16152f52fe..e05d1c7fee8d 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -482,7 +482,7 @@ static int soc_camera_open(struct file *file)
482 struct soc_camera_host *ici; 482 struct soc_camera_host *ici;
483 int ret; 483 int ret;
484 484
485 if (!icd->ops) 485 if (!to_soc_camera_control(icd))
486 /* No device driver attached */ 486 /* No device driver attached */
487 return -ENODEV; 487 return -ENODEV;
488 488
@@ -835,6 +835,9 @@ static int soc_camera_queryctrl(struct file *file, void *priv,
835 return 0; 835 return 0;
836 } 836 }
837 837
838 if (!icd->ops)
839 return -EINVAL;
840
838 /* Then device controls */ 841 /* Then device controls */
839 for (i = 0; i < icd->ops->num_controls; i++) 842 for (i = 0; i < icd->ops->num_controls; i++)
840 if (qc->id == icd->ops->controls[i].id) { 843 if (qc->id == icd->ops->controls[i].id) {
@@ -1461,11 +1464,6 @@ static int soc_camera_video_start(struct soc_camera_device *icd)
1461 if (!icd->parent) 1464 if (!icd->parent)
1462 return -ENODEV; 1465 return -ENODEV;
1463 1466
1464 if (!icd->ops ||
1465 !icd->ops->query_bus_param ||
1466 !icd->ops->set_bus_param)
1467 return -EINVAL;
1468
1469 ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1); 1467 ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1);
1470 if (ret < 0) { 1468 if (ret < 0) {
1471 dev_err(icd->pdev, "video_register_device failed: %d\n", ret); 1469 dev_err(icd->pdev, "video_register_device failed: %d\n", ret);