[media] s5p-jpeg: Fix erroneous condition while validating bytesperline value
authorJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 25 Nov 2013 09:58:10 +0000 (06:58 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 03:01:09 +0000 (12:01 +0900)
commit4e0a8434d1acc842b528b2f163a40434d9263205
tree9fce28ec6128a06997b9da2fc0c81d89661d5b76
parent52e7f17b4726a959d8dd8e741f174738e5503c1c
[media] s5p-jpeg: Fix erroneous condition while validating bytesperline value

The aim of the condition is ensuring that the bytesperline
value set by the user space application is proper for the
given format and adjusting it if isn't. As the depth value
of the format description entry is expressed in bits then
the bytesperline value needs to be divided, not multiplied,
by that value to get the number of bytes required to store
single line of image samples.

Change-Id: Ied5ab2df3b4ab89d44178481a9b15c51e4d02085
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/s5p-jpeg/jpeg-core.c