diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 10:46:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:18:43 -0400 |
commit | a0705b07f1816ae2b85388fcda71de69c221b4b8 (patch) | |
tree | 7406da18408564e38645eeaa22ea49324fd1ca6a /drivers/media/video/pxa_camera.c | |
parent | 4a6110bc50da9a1883bf45614ac1d591253f0457 (diff) |
V4L/DVB (12515): soc-camera: use struct v4l2_rect in struct soc_camera_device
Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and
simplicity.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r-- | drivers/media/video/pxa_camera.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index bdc0d85c461b..0e4daaad2f4d 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -239,7 +239,7 @@ static int pxa_videobuf_setup(struct videobuf_queue *vq, unsigned int *count, | |||
239 | 239 | ||
240 | dev_dbg(&icd->dev, "count=%d, size=%d\n", *count, *size); | 240 | dev_dbg(&icd->dev, "count=%d, size=%d\n", *count, *size); |
241 | 241 | ||
242 | *size = roundup(icd->width * icd->height * | 242 | *size = roundup(icd->rect_current.width * icd->rect_current.height * |
243 | ((icd->current_fmt->depth + 7) >> 3), 8); | 243 | ((icd->current_fmt->depth + 7) >> 3), 8); |
244 | 244 | ||
245 | if (0 == *count) | 245 | if (0 == *count) |
@@ -443,12 +443,12 @@ static int pxa_videobuf_prepare(struct videobuf_queue *vq, | |||
443 | buf->inwork = 1; | 443 | buf->inwork = 1; |
444 | 444 | ||
445 | if (buf->fmt != icd->current_fmt || | 445 | if (buf->fmt != icd->current_fmt || |
446 | vb->width != icd->width || | 446 | vb->width != icd->rect_current.width || |
447 | vb->height != icd->height || | 447 | vb->height != icd->rect_current.height || |
448 | vb->field != field) { | 448 | vb->field != field) { |
449 | buf->fmt = icd->current_fmt; | 449 | buf->fmt = icd->current_fmt; |
450 | vb->width = icd->width; | 450 | vb->width = icd->rect_current.width; |
451 | vb->height = icd->height; | 451 | vb->height = icd->rect_current.height; |
452 | vb->field = field; | 452 | vb->field = field; |
453 | vb->state = VIDEOBUF_NEEDS_INIT; | 453 | vb->state = VIDEOBUF_NEEDS_INIT; |
454 | } | 454 | } |
@@ -1118,7 +1118,7 @@ static int pxa_camera_set_bus_param(struct soc_camera_device *icd, __u32 pixfmt) | |||
1118 | if (cicr0 & CICR0_ENB) | 1118 | if (cicr0 & CICR0_ENB) |
1119 | __raw_writel(cicr0 & ~CICR0_ENB, pcdev->base + CICR0); | 1119 | __raw_writel(cicr0 & ~CICR0_ENB, pcdev->base + CICR0); |
1120 | 1120 | ||
1121 | cicr1 = CICR1_PPL_VAL(icd->width - 1) | bpp | dw; | 1121 | cicr1 = CICR1_PPL_VAL(icd->rect_current.width - 1) | bpp | dw; |
1122 | 1122 | ||
1123 | switch (pixfmt) { | 1123 | switch (pixfmt) { |
1124 | case V4L2_PIX_FMT_YUV422P: | 1124 | case V4L2_PIX_FMT_YUV422P: |
@@ -1147,7 +1147,7 @@ static int pxa_camera_set_bus_param(struct soc_camera_device *icd, __u32 pixfmt) | |||
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | cicr2 = 0; | 1149 | cicr2 = 0; |
1150 | cicr3 = CICR3_LPF_VAL(icd->height - 1) | | 1150 | cicr3 = CICR3_LPF_VAL(icd->rect_current.height - 1) | |
1151 | CICR3_BFW_VAL(min((unsigned short)255, icd->y_skip_top)); | 1151 | CICR3_BFW_VAL(min((unsigned short)255, icd->y_skip_top)); |
1152 | cicr4 |= pcdev->mclk_divisor; | 1152 | cicr4 |= pcdev->mclk_divisor; |
1153 | 1153 | ||