diff options
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r-- | drivers/media/video/pxa_camera.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 5ec5bb9a94d2..c3a7d476dc4b 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <media/v4l2-common.h> | 31 | #include <media/v4l2-common.h> |
32 | #include <media/v4l2-dev.h> | 32 | #include <media/v4l2-dev.h> |
33 | #include <media/videobuf-dma-sg.h> | ||
33 | #include <media/soc_camera.h> | 34 | #include <media/soc_camera.h> |
34 | 35 | ||
35 | #include <linux/videodev2.h> | 36 | #include <linux/videodev2.h> |
@@ -582,6 +583,16 @@ static struct videobuf_queue_ops pxa_videobuf_ops = { | |||
582 | .buf_release = pxa_videobuf_release, | 583 | .buf_release = pxa_videobuf_release, |
583 | }; | 584 | }; |
584 | 585 | ||
586 | static void pxa_camera_init_videobuf(struct videobuf_queue *q, spinlock_t *lock, | ||
587 | struct soc_camera_device *icd) | ||
588 | { | ||
589 | /* We must pass NULL as dev pointer, then all pci_* dma operations | ||
590 | * transform to normal dma_* ones. */ | ||
591 | videobuf_queue_sg_init(q, &pxa_videobuf_ops, NULL, lock, | ||
592 | V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE, | ||
593 | sizeof(struct pxa_buffer), icd); | ||
594 | } | ||
595 | |||
585 | static int mclk_get_divisor(struct pxa_camera_dev *pcdev) | 596 | static int mclk_get_divisor(struct pxa_camera_dev *pcdev) |
586 | { | 597 | { |
587 | unsigned int mclk_10khz = pcdev->platform_mclk_10khz; | 598 | unsigned int mclk_10khz = pcdev->platform_mclk_10khz; |
@@ -998,6 +1009,7 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = { | |||
998 | .remove = pxa_camera_remove_device, | 1009 | .remove = pxa_camera_remove_device, |
999 | .set_fmt_cap = pxa_camera_set_fmt_cap, | 1010 | .set_fmt_cap = pxa_camera_set_fmt_cap, |
1000 | .try_fmt_cap = pxa_camera_try_fmt_cap, | 1011 | .try_fmt_cap = pxa_camera_try_fmt_cap, |
1012 | .init_videobuf = pxa_camera_init_videobuf, | ||
1001 | .reqbufs = pxa_camera_reqbufs, | 1013 | .reqbufs = pxa_camera_reqbufs, |
1002 | .poll = pxa_camera_poll, | 1014 | .poll = pxa_camera_poll, |
1003 | .querycap = pxa_camera_querycap, | 1015 | .querycap = pxa_camera_querycap, |
@@ -1009,8 +1021,6 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = { | |||
1009 | /* Should be allocated dynamically too, but we have only one. */ | 1021 | /* Should be allocated dynamically too, but we have only one. */ |
1010 | static struct soc_camera_host pxa_soc_camera_host = { | 1022 | static struct soc_camera_host pxa_soc_camera_host = { |
1011 | .drv_name = PXA_CAM_DRV_NAME, | 1023 | .drv_name = PXA_CAM_DRV_NAME, |
1012 | .vbq_ops = &pxa_videobuf_ops, | ||
1013 | .msize = sizeof(struct pxa_buffer), | ||
1014 | .ops = &pxa_soc_camera_host_ops, | 1024 | .ops = &pxa_soc_camera_host_ops, |
1015 | }; | 1025 | }; |
1016 | 1026 | ||