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>
This commit is contained in:
Jean-Francois Moine 2008-10-22 14:51:56 -03:00 committed by Mauro Carvalho Chehab
parent 5017c7bde4
commit 8fe2f1d522
2 changed files with 6 additions and 3 deletions

View File

@ -314,9 +314,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
int ret; int ret;
int size_ret; int size_ret;
/* Reset bulk in endpoint */
usb_clear_halt(gspca_dev->dev, gspca_dev->cam.epaddr);
/* Init the device */ /* Init the device */
memset(gspca_dev->usb_buf, 0, 12); memset(gspca_dev->usb_buf, 0, 12);
gspca_dev->usb_buf[0] = 0xc6; gspca_dev->usb_buf[0] = 0xc6;

View File

@ -597,6 +597,12 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
if (ret < 0) if (ret < 0)
goto out; goto out;
/* clear the bulk endpoint */
if (gspca_dev->alt == 0) /* if bulk transfer */
usb_clear_halt(gspca_dev->dev,
usb_rcvintpipe(gspca_dev->dev,
gspca_dev->cam.epaddr));
/* start the cam */ /* start the cam */
ret = gspca_dev->sd_desc->start(gspca_dev); ret = gspca_dev->sd_desc->start(gspca_dev);
if (ret < 0) { if (ret < 0) {