V4L/DVB (12173): mt9v011: properly calculate image resolution registers
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 4 Jul 2009 11:03:48 +0000 (08:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 5 Jul 2009 17:30:04 +0000 (14:30 -0300)
commit27fe4a30a211a0561c72b0e519997e91fa91c452
tree33d8c55054816a366b99ec2df3c5bcc19917b3ec
parentfbe2800c932573e90e38a9c703165839e0c00515
V4L/DVB (12173): mt9v011: properly calculate image resolution registers

Instead of working with a table of precalculated values, fill them with
the proper values. Also, adds format functions that allow changing the
resolution, by cropping the image to the center of the sensor.

While here, move the sensor version check to the probe routine, to
indicate to the caller if the sensor is not supported by this driver.

Also, fixes a stupid bug where we're using &buffer[] instead of
buffer[].

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mt9v011.c