aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mx2_camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mx2_camera.c')
-rw-r--r--drivers/media/video/mx2_camera.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 4a27862da30d..072bd2d1cfad 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -31,6 +31,7 @@
31 31
32#include <media/v4l2-common.h> 32#include <media/v4l2-common.h>
33#include <media/v4l2-dev.h> 33#include <media/v4l2-dev.h>
34#include <media/videobuf-core.h>
34#include <media/videobuf-dma-contig.h> 35#include <media/videobuf-dma-contig.h>
35#include <media/soc_camera.h> 36#include <media/soc_camera.h>
36#include <media/soc_mediabus.h> 37#include <media/soc_mediabus.h>
@@ -903,8 +904,6 @@ static int mx2_camera_set_crop(struct soc_camera_device *icd,
903static int mx2_camera_set_fmt(struct soc_camera_device *icd, 904static int mx2_camera_set_fmt(struct soc_camera_device *icd,
904 struct v4l2_format *f) 905 struct v4l2_format *f)
905{ 906{
906 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
907 struct mx2_camera_dev *pcdev = ici->priv;
908 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 907 struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
909 const struct soc_camera_format_xlate *xlate; 908 const struct soc_camera_format_xlate *xlate;
910 struct v4l2_pix_format *pix = &f->fmt.pix; 909 struct v4l2_pix_format *pix = &f->fmt.pix;
@@ -943,8 +942,6 @@ static int mx2_camera_set_fmt(struct soc_camera_device *icd,
943static int mx2_camera_try_fmt(struct soc_camera_device *icd, 942static int mx2_camera_try_fmt(struct soc_camera_device *icd,
944 struct v4l2_format *f) 943 struct v4l2_format *f)
945{ 944{
946 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
947 struct mx2_camera_dev *pcdev = ici->priv;
948 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 945 struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
949 const struct soc_camera_format_xlate *xlate; 946 const struct soc_camera_format_xlate *xlate;
950 struct v4l2_pix_format *pix = &f->fmt.pix; 947 struct v4l2_pix_format *pix = &f->fmt.pix;
@@ -1024,13 +1021,13 @@ static int mx2_camera_querycap(struct soc_camera_host *ici,
1024 return 0; 1021 return 0;
1025} 1022}
1026 1023
1027static int mx2_camera_reqbufs(struct soc_camera_file *icf, 1024static int mx2_camera_reqbufs(struct soc_camera_device *icd,
1028 struct v4l2_requestbuffers *p) 1025 struct v4l2_requestbuffers *p)
1029{ 1026{
1030 int i; 1027 int i;
1031 1028
1032 for (i = 0; i < p->count; i++) { 1029 for (i = 0; i < p->count; i++) {
1033 struct mx2_buffer *buf = container_of(icf->vb_vidq.bufs[i], 1030 struct mx2_buffer *buf = container_of(icd->vb_vidq.bufs[i],
1034 struct mx2_buffer, vb); 1031 struct mx2_buffer, vb);
1035 INIT_LIST_HEAD(&buf->vb.queue); 1032 INIT_LIST_HEAD(&buf->vb.queue);
1036 } 1033 }
@@ -1151,9 +1148,9 @@ err_out:
1151 1148
1152static unsigned int mx2_camera_poll(struct file *file, poll_table *pt) 1149static unsigned int mx2_camera_poll(struct file *file, poll_table *pt)
1153{ 1150{
1154 struct soc_camera_file *icf = file->private_data; 1151 struct soc_camera_device *icd = file->private_data;
1155 1152
1156 return videobuf_poll_stream(file, &icf->vb_vidq, pt); 1153 return videobuf_poll_stream(file, &icd->vb_vidq, pt);
1157} 1154}
1158 1155
1159static struct soc_camera_host_ops mx2_soc_camera_host_ops = { 1156static struct soc_camera_host_ops mx2_soc_camera_host_ops = {