aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-13 15:11:08 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:09:39 -0300
commit44dc733cd9edac53402d705cd2f720accd0b3e2c (patch)
tree256c0a7a30b4bed9cbf0c6b5ee809b6905603317 /drivers/media/video/em28xx/em28xx-core.c
parent59d3448995a4c0ca98cbe82f6dac9460323377c1 (diff)
V4L/DVB (7567): em28xx: Some cleanups
Removes some fields from data structs. There are some fields that are just caching some calculus for buffer size. The calculus were moved to the places it were needed and the now unused fields were removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index 95bc18d0e78..97635abb916 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -396,13 +396,13 @@ int em28xx_set_alternate(struct em28xx *dev)
{
int errCode, prev_alt = dev->alt;
int i;
- unsigned int min_pkt_size = dev->bytesperline + 4;
+ unsigned int min_pkt_size = dev->width * 2 + 4;
/* When image size is bigger than a certain value,
the frame size should be increased, otherwise, only
green screen will be received.
*/
- if (dev->frame_size > 720*240*2)
+ if (dev->width * 2 * dev->height > 720 * 240 * 2)
min_pkt_size *= 2;
for (i = 0; i < dev->num_alt; i++) {