V4L/DVB (11908): w8968cf: Use v4l bounding/alignment function
authorTrent Piepho <xyzzy@speakeasy.org>
Sun, 31 May 2009 00:45:46 +0000 (21:45 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 23 Jun 2009 06:21:19 +0000 (03:21 -0300)
commit1c657a99fd655c0daa7450854a914d21c1da805c
tree8872a5e58f98fc846627b8c45689c26f0f74e3c8
parent4b89945e590f94e82a6e7f33e21cbd0d83774b9e
V4L/DVB (11908): w8968cf: Use v4l bounding/alignment function

The v4l function has a better algorithm for aligning image size.

The existing code was casting pointers to u32 and to unsigned int into
pointers to u16.  This could mess up if someone passed in an image size
greater than 65,535 and on big-endian platforms it won't work at all.

The existing bounding code would shrink an image if it was too big, but
returned ERANGE if it was too small.  The code will not shrink or expand as
necessary.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/w9968cf.c