]> git.baikalelectronics.ru Git - kernel.git/commit
[media] media: soc-camera: remove superfluous JPEG checking
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Mon, 8 Oct 2012 13:02:55 +0000 (10:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 20 Dec 2012 16:26:40 +0000 (14:26 -0200)
commit9b21b2a66068f76847369d380aad0851c713c3dd
tree9f600f30db8e7d8562ae4da595f89f0b7301e285
parentb3caf2ef71912fc7d7438101bd6190974b97e449
[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>
drivers/media/platform/soc_camera/soc_mediabus.c