[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)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 18 Dec 2013 08:12:32 +0000 (06:12 -0200)
commitcc690904247fdbb169e2544cbbbd4ebd2c05f8cb
tree5528eb98cb09974923164658f8edbee7b985457e
parentc97ba28b0f17d88ef072e3536aa160df6d48431d
[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.

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