diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 045547e17656..5cc850666fd7 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -797,20 +797,9 @@ int em28xx_set_alternate(struct em28xx *dev) | |||
797 | dev->alt = alt; | 797 | dev->alt = alt; |
798 | if (dev->alt == 0) { | 798 | if (dev->alt == 0) { |
799 | int i; | 799 | int i; |
800 | if(dev->is_em2800){ /* always use the max packet size for em2800 based devices */ | 800 | for(i=0;i< EM28XX_MAX_ALT; i++) |
801 | for(i=0;i< EM28XX_MAX_ALT; i++) | 801 | if(dev->alt_max_pkt_size[i]>dev->alt_max_pkt_size[dev->alt]) |
802 | if(dev->alt_max_pkt_size[i]>dev->alt_max_pkt_size[dev->alt]) | 802 | dev->alt=i; |
803 | dev->alt=i; | ||
804 | }else{ | ||
805 | unsigned int min_pkt_size = dev->field_size / 137; /* FIXME: empiric magic number */ | ||
806 | em28xx_coredbg("minimum isoc packet size: %u", min_pkt_size); | ||
807 | dev->alt = 7; | ||
808 | for (i = 1; i < EM28XX_MAX_ALT; i += 2) /* FIXME: skip even alternate: why do they not work? */ | ||
809 | if (dev->alt_max_pkt_size[i] >= min_pkt_size) { | ||
810 | dev->alt = i; | ||
811 | break; | ||
812 | } | ||
813 | } | ||
814 | } | 803 | } |
815 | 804 | ||
816 | if (dev->alt != prev_alt) { | 805 | if (dev->alt != prev_alt) { |