aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pxa_camera.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-03-13 17:44:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-13 17:44:51 -0400
commit97fb44eb6bc01f4ffed4300e475aa15e44877375 (patch)
tree481ed6efd0babe7185cae04f2fd295426b36411d /drivers/media/video/pxa_camera.c
parente4707dd3e9d0cb57597b6568a5e51fea5d6fca41 (diff)
parent148854c65ea8046b045672fd49f4333aefaa3ab5 (diff)
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts: arch/arm/mach-at91/gpio.c
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r--drivers/media/video/pxa_camera.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index e3e6b29ea6d2..0c4ce58c53d5 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1154,23 +1154,23 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd,
1154{ 1154{
1155 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); 1155 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
1156 struct pxa_camera_dev *pcdev = ici->priv; 1156 struct pxa_camera_dev *pcdev = ici->priv;
1157 const struct soc_camera_data_format *host_fmt, *cam_fmt = NULL; 1157 const struct soc_camera_data_format *cam_fmt = NULL;
1158 const struct soc_camera_format_xlate *xlate; 1158 const struct soc_camera_format_xlate *xlate = NULL;
1159 struct soc_camera_sense sense = { 1159 struct soc_camera_sense sense = {
1160 .master_clock = pcdev->mclk, 1160 .master_clock = pcdev->mclk,
1161 .pixel_clock_max = pcdev->ciclk / 4, 1161 .pixel_clock_max = pcdev->ciclk / 4,
1162 }; 1162 };
1163 int ret, buswidth; 1163 int ret;
1164 1164
1165 xlate = soc_camera_xlate_by_fourcc(icd, pixfmt); 1165 if (pixfmt) {
1166 if (!xlate) { 1166 xlate = soc_camera_xlate_by_fourcc(icd, pixfmt);
1167 dev_warn(&ici->dev, "Format %x not found\n", pixfmt); 1167 if (!xlate) {
1168 return -EINVAL; 1168 dev_warn(&ici->dev, "Format %x not found\n", pixfmt);
1169 } 1169 return -EINVAL;
1170 }
1170 1171
1171 buswidth = xlate->buswidth; 1172 cam_fmt = xlate->cam_fmt;
1172 host_fmt = xlate->host_fmt; 1173 }
1173 cam_fmt = xlate->cam_fmt;
1174 1174
1175 /* If PCLK is used to latch data from the sensor, check sense */ 1175 /* If PCLK is used to latch data from the sensor, check sense */
1176 if (pcdev->platform_flags & PXA_CAMERA_PCLK_EN) 1176 if (pcdev->platform_flags & PXA_CAMERA_PCLK_EN)
@@ -1200,8 +1200,8 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd,
1200 } 1200 }
1201 1201
1202 if (pixfmt && !ret) { 1202 if (pixfmt && !ret) {
1203 icd->buswidth = buswidth; 1203 icd->buswidth = xlate->buswidth;
1204 icd->current_fmt = host_fmt; 1204 icd->current_fmt = xlate->host_fmt;
1205 } 1205 }
1206 1206
1207 return ret; 1207 return ret;