V4L/DVB (12517): mt9t031: improve rectangle placement in invalid S_CROP
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 25 Aug 2009 14:46:42 +0000 (11:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Sep 2009 03:18:46 +0000 (00:18 -0300)
commite330919a215714796efb451984a753a46b570eb7
tree80193477bd357dca8552eda00955d8befd611ecb
parentbf62e1da6ac848b0c3f72665d05939263e9f4128
V4L/DVB (12517): mt9t031: improve rectangle placement in invalid S_CROP

1. soc-camera always requests a valid rectangle, when calling .s_fmt(), no need
to check and adjust
2. in .s_crop(), if the rectangle exceeds sensor limits, push it to the
respective border instead of centering
3. take into account left and top borders when checking

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mt9t031.c