Skip to content

Commit

Permalink
V4L/DVB (9544): gspca: Clear the bulk endpoint at starting time when …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 5017c7b commit 8fe2f1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/media/video/gspca/finepix.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
int ret;
int size_ret;

/* Reset bulk in endpoint */
usb_clear_halt(gspca_dev->dev, gspca_dev->cam.epaddr);

/* Init the device */
memset(gspca_dev->usb_buf, 0, 12);
gspca_dev->usb_buf[0] = 0xc6;
Expand Down
6 changes: 6 additions & 0 deletions drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,12 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
if (ret < 0)
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 */
ret = gspca_dev->sd_desc->start(gspca_dev);
if (ret < 0) {
Expand Down

0 comments on commit 8fe2f1d

Please sign in to comment.