From: Jean-Francois Moine Date: Wed, 22 Oct 2008 17:51:56 +0000 (-0300) Subject: V4L/DVB (9544): gspca: Clear the bulk endpoint at starting time when bulk transfer. X-Git-Tag: firefly_0821_release~16456^2~437 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8fe2f1d522bb599eccfff6ef4fc55f7b7abbaeec;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Mauro Carvalho Chehab --- 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) 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; 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) 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) {