]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4882c2966221b30dd521367b59654865b119a0ea
tree8872a5e58f98fc846627b8c45689c26f0f74e3c8
parentb68d13f996de5a763a5b9473cf0f24307ebe0a08
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