scpi_usbtmc_libusb: remove libusb_clear_halt() hack which is not useful anymore

This commit is contained in:
Aurelien Jacobs 2015-09-23 00:30:06 +02:00 committed by Uwe Hermann
parent a73665a3fa
commit 7977054d61
1 changed files with 0 additions and 15 deletions

View File

@ -622,26 +622,11 @@ static int scpi_usbtmc_libusb_close(struct sr_scpi_dev_inst *scpi)
{
struct scpi_usbtmc_libusb *uscpi = scpi->priv;
struct sr_usb_dev_inst *usb = uscpi->usb;
struct libusb_device *dev;
struct libusb_device_descriptor des;
int ret;
if (!usb->devhdl)
return SR_ERR;
dev = libusb_get_device(usb->devhdl);
libusb_get_device_descriptor(dev, &des);
if (des.idVendor == 0x1ab1 && des.idProduct == 0x0588
&& scpi->firmware_version >= 24) {
/* Rigol DS1000 with firmware > 0.2.4 needs this. */
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_in_ep)) < 0)
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
uscpi->bulk_out_ep, libusb_error_name(ret));
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_out_ep)) < 0)
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
uscpi->bulk_out_ep, libusb_error_name(ret));
}
scpi_usbtmc_local(uscpi);
if ((ret = libusb_release_interface(usb->devhdl, uscpi->interface)) < 0)