From 6d8e41de4953417c43bb7b97ce4ea305cf207522 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Wed, 22 Oct 2008 19:51:56 +0200 Subject: gspca: Clear the bulk endpoint at starting time when bulk transfer. From: Jean-Francois Moine - usb_clear_halt() added in gspca and removed in finepix. Priority: normal Signed-off-by: Jean-Francois Moine --- linux/drivers/media/video/gspca/finepix.c | 3 --- linux/drivers/media/video/gspca/gspca.c | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/gspca/finepix.c b/linux/drivers/media/video/gspca/finepix.c index 65d3cbfe6..d3e3f085b 100644 --- a/linux/drivers/media/video/gspca/finepix.c +++ b/linux/drivers/media/video/gspca/finepix.c @@ -308,9 +308,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/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index 4e0e7a32a..a602dac6b 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -607,6 +607,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) { -- cgit v1.2.3