aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/soc_camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/soc_camera.c')
-rw-r--r--drivers/media/video/soc_camera.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 91e1ab36fe5d..4af38d444e0c 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -38,9 +38,9 @@ format_by_fourcc(struct soc_camera_device *icd, unsigned int fourcc)
38{ 38{
39 unsigned int i; 39 unsigned int i;
40 40
41 for (i = 0; i < icd->ops->num_formats; i++) 41 for (i = 0; i < icd->num_formats; i++)
42 if (icd->ops->formats[i].fourcc == fourcc) 42 if (icd->formats[i].fourcc == fourcc)
43 return icd->ops->formats + i; 43 return icd->formats + i;
44 return NULL; 44 return NULL;
45} 45}
46 46
@@ -384,10 +384,10 @@ static int soc_camera_enum_fmt_cap(struct file *file, void *priv,
384 384
385 WARN_ON(priv != file->private_data); 385 WARN_ON(priv != file->private_data);
386 386
387 if (f->index >= icd->ops->num_formats) 387 if (f->index >= icd->num_formats)
388 return -EINVAL; 388 return -EINVAL;
389 389
390 format = &icd->ops->formats[f->index]; 390 format = &icd->formats[f->index];
391 391
392 strlcpy(f->description, format->name, sizeof(f->description)); 392 strlcpy(f->description, format->name, sizeof(f->description));
393 f->pixelformat = format->fourcc; 393 f->pixelformat = format->fourcc;
@@ -701,7 +701,7 @@ static int soc_camera_probe(struct device *dev)
701 to_soc_camera_host(icd->dev.parent); 701 to_soc_camera_host(icd->dev.parent);
702 int ret; 702 int ret;
703 703
704 if (!icd->probe) 704 if (!icd->ops->probe)
705 return -ENODEV; 705 return -ENODEV;
706 706
707 /* We only call ->add() here to activate and probe the camera. 707 /* We only call ->add() here to activate and probe the camera.
@@ -710,7 +710,7 @@ static int soc_camera_probe(struct device *dev)
710 if (ret < 0) 710 if (ret < 0)
711 return ret; 711 return ret;
712 712
713 ret = icd->probe(icd); 713 ret = icd->ops->probe(icd);
714 if (ret >= 0) { 714 if (ret >= 0) {
715 const struct v4l2_queryctrl *qctrl; 715 const struct v4l2_queryctrl *qctrl;
716 716
@@ -731,8 +731,8 @@ static int soc_camera_remove(struct device *dev)
731{ 731{
732 struct soc_camera_device *icd = to_soc_camera_dev(dev); 732 struct soc_camera_device *icd = to_soc_camera_dev(dev);
733 733
734 if (icd->remove) 734 if (icd->ops->remove)
735 icd->remove(icd); 735 icd->ops->remove(icd);
736 736
737 return 0; 737 return 0;
738} 738}
@@ -928,7 +928,7 @@ int soc_camera_video_start(struct soc_camera_device *icd)
928 vdev->vidioc_s_register = soc_camera_s_register; 928 vdev->vidioc_s_register = soc_camera_s_register;
929#endif 929#endif
930 930
931 icd->current_fmt = &icd->ops->formats[0]; 931 icd->current_fmt = &icd->formats[0];
932 932
933 err = video_register_device(vdev, VFL_TYPE_GRABBER, vdev->minor); 933 err = video_register_device(vdev, VFL_TYPE_GRABBER, vdev->minor);
934 if (err < 0) { 934 if (err < 0) {