diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-08 21:38:52 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 07:56:31 -0800 |
commit | 9d4d9c05c807ab8a49ac0024987b223bb32c022d (patch) | |
tree | 6f2401a04654a11e2190ce610eab664693784a66 /drivers/media/video/em28xx/em28xx-core.c | |
parent | 7f7e846ca552c4cf2e04b4666cea18dc26b36b59 (diff) | |
download | kernel_samsung_smdk4412-9d4d9c05c807ab8a49ac0024987b223bb32c022d.zip kernel_samsung_smdk4412-9d4d9c05c807ab8a49ac0024987b223bb32c022d.tar.gz kernel_samsung_smdk4412-9d4d9c05c807ab8a49ac0024987b223bb32c022d.tar.bz2 |
[PATCH] V4L: 920: fixed autodetection of max size by if alternate setting
- Fixed autodetection of max size by if alternate setting
- Fixed some debug messages
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 5cc8506..d54bc01 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -797,20 +797,19 @@ int em28xx_set_alternate(struct em28xx *dev) dev->alt = alt; if (dev->alt == 0) { int i; - for(i=0;i< EM28XX_MAX_ALT; i++) + for(i=0;i< dev->num_alt; i++) if(dev->alt_max_pkt_size[i]>dev->alt_max_pkt_size[dev->alt]) dev->alt=i; } if (dev->alt != prev_alt) { dev->max_pkt_size = dev->alt_max_pkt_size[dev->alt]; - em28xx_coredbg("setting alternate %d with wMaxPacketSize=%u", dev->alt, + em28xx_coredbg("setting alternate %d with wMaxPacketSize=%u\n", dev->alt, dev->max_pkt_size); errCode = usb_set_interface(dev->udev, 0, dev->alt); if (errCode < 0) { - em28xx_errdev - ("cannot change alternate number to %d (error=%i)\n", - dev->alt, errCode); + em28xx_errdev ("cannot change alternate number to %d (error=%i)\n", + dev->alt, errCode); return errCode; } } |