[media] dvb_usb_v2: remove usb_clear_halt()
authorAntti Palosaari <crope@iki.fi>
Wed, 6 Jun 2012 18:01:32 +0000 (15:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 4 Aug 2012 10:56:26 +0000 (07:56 -0300)
Calling usb_clear_halt() during device init is not correct.
2 of 7 AF9015 devices I have timeouts next USB control message
after usb_clear_halt(). It was originally performed between
tuner_attach() and rc_query() and likely not causing problems
since rc_query() is repeated continously. None could see it when
first rc_query() failed...

Secondly it was not called for .generic_bulk_ctrl_endpoint_response.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dvb_usb_init.c

index d7a6efc9a52e21f265ded15355ac92d47062ffd3..581be9d990a0af1f52027c18ec9ca2cae1ef5144 100644 (file)
@@ -145,17 +145,6 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d)
                d->state |= DVB_USB_STATE_DVB;
        }
 
-       /*
-        * when reloading the driver w/o replugging the device
-        * sometimes a timeout occures, this helps
-        */
-       if (d->props.generic_bulk_ctrl_endpoint != 0) {
-               usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev,
-                       d->props.generic_bulk_ctrl_endpoint));
-               usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev,
-                       d->props.generic_bulk_ctrl_endpoint));
-       }
-
        return 0;
 err:
        pr_debug("%s: failed=%d\n", __func__, ret);
@@ -177,7 +166,6 @@ static int dvb_usb_adapter_exit(struct dvb_usb_device *d)
        return 0;
 }
 
-
 /* general initialization functions */
 static int dvb_usb_exit(struct dvb_usb_device *d)
 {