diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-06-04 13:11:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:21 -0400 |
commit | 6523208758a7a0dbb8947e248110992da53d4143 (patch) | |
tree | 86e5d3f92eceadee232e92ae3004c10801563b24 /drivers/media/video/mx3_camera.c | |
parent | 82a7c049449ec5a2194249da341ec8bde14e968b (diff) |
[media] V4L: mx3_camera: remove redundant calculations
soc_camera core now performs the standard .bytesperline and .sizeimage
calculations internally, no need to duplicate in drivers.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mx3_camera.c')
-rw-r--r-- | drivers/media/video/mx3_camera.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index 36f0ed9ca9e1..cdb7dad05c1e 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c | |||
@@ -912,12 +912,6 @@ static int mx3_camera_set_fmt(struct soc_camera_device *icd, | |||
912 | pix->colorspace = mf.colorspace; | 912 | pix->colorspace = mf.colorspace; |
913 | icd->current_fmt = xlate; | 913 | icd->current_fmt = xlate; |
914 | 914 | ||
915 | pix->bytesperline = soc_mbus_bytes_per_line(pix->width, | ||
916 | xlate->host_fmt); | ||
917 | if (pix->bytesperline < 0) | ||
918 | return pix->bytesperline; | ||
919 | pix->sizeimage = pix->height * pix->bytesperline; | ||
920 | |||
921 | dev_dbg(icd->dev.parent, "Sensor set %dx%d\n", pix->width, pix->height); | 915 | dev_dbg(icd->dev.parent, "Sensor set %dx%d\n", pix->width, pix->height); |
922 | 916 | ||
923 | return ret; | 917 | return ret; |
@@ -945,12 +939,6 @@ static int mx3_camera_try_fmt(struct soc_camera_device *icd, | |||
945 | if (pix->width > 4096) | 939 | if (pix->width > 4096) |
946 | pix->width = 4096; | 940 | pix->width = 4096; |
947 | 941 | ||
948 | pix->bytesperline = soc_mbus_bytes_per_line(pix->width, | ||
949 | xlate->host_fmt); | ||
950 | if (pix->bytesperline < 0) | ||
951 | return pix->bytesperline; | ||
952 | pix->sizeimage = pix->height * pix->bytesperline; | ||
953 | |||
954 | /* limit to sensor capabilities */ | 942 | /* limit to sensor capabilities */ |
955 | mf.width = pix->width; | 943 | mf.width = pix->width; |
956 | mf.height = pix->height; | 944 | mf.height = pix->height; |