aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2009-02-08 08:45:34 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:44 -0400
commit3e099baff451affd13a93c6fed216943e01b80fd (patch)
tree7e33bb858ed4afc80426ce00d00f7cffa0566465
parent56ee38071fe0cf1746d53c5b40a46a835b24fbe4 (diff)
V4L/DVB (10517): em28xx: remove bad check (changeset a31c595188af)
Removed bad check. Thanks to Robert Krakora <rob.krakora@messagenetsystems.com> to report that. Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index 43e8d7d91a96..7a62c77b8485 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -61,7 +61,7 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev)
61 int i; 61 int i;
62 62
63 dprintk("Stopping isoc\n"); 63 dprintk("Stopping isoc\n");
64 for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { 64 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
65 if (!irqs_disabled()) 65 if (!irqs_disabled())
66 usb_kill_urb(dev->adev.urb[i]); 66 usb_kill_urb(dev->adev.urb[i]);
67 else 67 else
@@ -73,7 +73,6 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev)
73 dev->adev.transfer_buffer[i] = NULL; 73 dev->adev.transfer_buffer[i] = NULL;
74 } 74 }
75 75
76 dev->isoc_ctl.num_bufs = 0;
77 return 0; 76 return 0;
78} 77}
79 78
@@ -157,8 +156,6 @@ static int em28xx_init_audio_isoc(struct em28xx *dev)
157 156
158 dprintk("Starting isoc transfers\n"); 157 dprintk("Starting isoc transfers\n");
159 158
160 dev->isoc_ctl.num_bufs = 0;
161
162 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) { 159 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
163 struct urb *urb; 160 struct urb *urb;
164 int j, k; 161 int j, k;
@@ -200,19 +197,10 @@ static int em28xx_init_audio_isoc(struct em28xx *dev)
200 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) { 197 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
201 errCode = usb_submit_urb(dev->adev.urb[i], GFP_ATOMIC); 198 errCode = usb_submit_urb(dev->adev.urb[i], GFP_ATOMIC);
202 if (errCode) { 199 if (errCode) {
203 if (dev->isoc_ctl.num_bufs == 0) { 200 em28xx_isoc_audio_deinit(dev);
204 usb_free_urb(dev->adev.urb[i]);
205 dev->adev.urb[i] = NULL;
206 kfree(dev->adev.transfer_buffer[i]);
207 dev->adev.transfer_buffer[i] = NULL;
208 } else
209 em28xx_isoc_audio_deinit(dev);
210 201
211 return errCode; 202 return errCode;
212 } 203 }
213 mutex_lock(&dev->lock);
214 dev->isoc_ctl.num_bufs++;
215 mutex_unlock(&dev->lock);
216 } 204 }
217 205
218 return 0; 206 return 0;