aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-10-22 13:51:56 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:28 -0500
commit8fe2f1d522bb599eccfff6ef4fc55f7b7abbaeec (patch)
treeaa96c504359dc7b8c68d23f1431ca910e32810ee
parent5017c7bde46abc859e0a350bcd591f502442d6af (diff)
V4L/DVB (9544): gspca: Clear the bulk endpoint at starting time when bulk transfer.
- usb_clear_halt() added in gspca and removed in finepix. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/finepix.c3
-rw-r--r--drivers/media/video/gspca/gspca.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/finepix.c b/drivers/media/video/gspca/finepix.c
index 607942fd7970..03cb94466323 100644
--- a/drivers/media/video/gspca/finepix.c
+++ b/drivers/media/video/gspca/finepix.c
@@ -314,9 +314,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
314 int ret; 314 int ret;
315 int size_ret; 315 int size_ret;
316 316
317 /* Reset bulk in endpoint */
318 usb_clear_halt(gspca_dev->dev, gspca_dev->cam.epaddr);
319
320 /* Init the device */ 317 /* Init the device */
321 memset(gspca_dev->usb_buf, 0, 12); 318 memset(gspca_dev->usb_buf, 0, 12);
322 gspca_dev->usb_buf[0] = 0xc6; 319 gspca_dev->usb_buf[0] = 0xc6;
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 6e23fd4a203f..afddb18024a8 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -597,6 +597,12 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
597 if (ret < 0) 597 if (ret < 0)
598 goto out; 598 goto out;
599 599
600 /* clear the bulk endpoint */
601 if (gspca_dev->alt == 0) /* if bulk transfer */
602 usb_clear_halt(gspca_dev->dev,
603 usb_rcvintpipe(gspca_dev->dev,
604 gspca_dev->cam.epaddr));
605
600 /* start the cam */ 606 /* start the cam */
601 ret = gspca_dev->sd_desc->start(gspca_dev); 607 ret = gspca_dev->sd_desc->start(gspca_dev);
602 if (ret < 0) { 608 if (ret < 0) {