mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 17:54:13 +08:00
[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>
This commit is contained in:
parent
e1db704326
commit
b0050e41ba
@ -482,7 +482,7 @@ static int soc_camera_open(struct file *file)
|
|||||||
struct soc_camera_host *ici;
|
struct soc_camera_host *ici;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!icd->ops)
|
if (!to_soc_camera_control(icd))
|
||||||
/* No device driver attached */
|
/* No device driver attached */
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
@ -835,6 +835,9 @@ static int soc_camera_queryctrl(struct file *file, void *priv,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!icd->ops)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* Then device controls */
|
/* Then device controls */
|
||||||
for (i = 0; i < icd->ops->num_controls; i++)
|
for (i = 0; i < icd->ops->num_controls; i++)
|
||||||
if (qc->id == icd->ops->controls[i].id) {
|
if (qc->id == icd->ops->controls[i].id) {
|
||||||
@ -1461,11 +1464,6 @@ static int soc_camera_video_start(struct soc_camera_device *icd)
|
|||||||
if (!icd->parent)
|
if (!icd->parent)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (!icd->ops ||
|
|
||||||
!icd->ops->query_bus_param ||
|
|
||||||
!icd->ops->set_bus_param)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1);
|
ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(icd->pdev, "video_register_device failed: %d\n", ret);
|
dev_err(icd->pdev, "video_register_device failed: %d\n", ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user