aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/soc_camera
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-10-08 10:02:55 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-20 14:26:40 -0200
commitcea4c9e46c4f656a81c93f09b5e3bde38bebb160 (patch)
tree9f600f30db8e7d8562ae4da595f89f0b7301e285 /drivers/media/platform/soc_camera
parent454547fb8217ac82de82fdffe0c2a41d8cd47bf4 (diff)
[media] media: soc-camera: remove superfluous JPEG checking
Explicit checks for the JPEG pixel format in soc_mbus_bytes_per_line() and soc_mbus_image_size() are superfluous, because also without them these functions will perform correctly. The former will return 0 based on packing == SOC_MBUS_PACKING_VARIABLE and the latter will simply multiply the user-provided line length by the image height to obtain a frame buffer size estimate. The original version of the "media: soc_camera: don't clear pix->sizeimage in JPEG mode" patch was correct and my amendment, adding these two checks was superfluous. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/soc_camera')
-rw-r--r--drivers/media/platform/soc_camera/soc_mediabus.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/media/platform/soc_camera/soc_mediabus.c b/drivers/media/platform/soc_camera/soc_mediabus.c
index a397812635d..89dce097a82 100644
--- a/drivers/media/platform/soc_camera/soc_mediabus.c
+++ b/drivers/media/platform/soc_camera/soc_mediabus.c
@@ -378,9 +378,6 @@ EXPORT_SYMBOL(soc_mbus_samples_per_pixel);
s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf)
{
- if (mf->fourcc == V4L2_PIX_FMT_JPEG)
- return 0;
-
if (mf->layout != SOC_MBUS_LAYOUT_PACKED)
return width * mf->bits_per_sample / 8;
@@ -403,9 +400,6 @@ EXPORT_SYMBOL(soc_mbus_bytes_per_line);
s32 soc_mbus_image_size(const struct soc_mbus_pixelfmt *mf,
u32 bytes_per_line, u32 height)
{
- if (mf->fourcc == V4L2_PIX_FMT_JPEG)
- return 0;
-
if (mf->layout == SOC_MBUS_LAYOUT_PACKED)
return bytes_per_line * height;