diff options
-rw-r--r-- | drivers/usb/class/usbtmc.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 619cc9975209..7c5f4e32c920 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
@@ -347,13 +347,8 @@ usbtmc_abort_bulk_out_check_status: | |||
347 | goto exit; | 347 | goto exit; |
348 | 348 | ||
349 | usbtmc_abort_bulk_out_clear_halt: | 349 | usbtmc_abort_bulk_out_clear_halt: |
350 | rv = usb_control_msg(data->usb_dev, | 350 | rv = usb_clear_halt(data->usb_dev, |
351 | usb_sndctrlpipe(data->usb_dev, 0), | 351 | usb_sndbulkpipe(data->usb_dev, data->bulk_out)); |
352 | USB_REQ_CLEAR_FEATURE, | ||
353 | USB_DIR_OUT | USB_TYPE_STANDARD | | ||
354 | USB_RECIP_ENDPOINT, | ||
355 | USB_ENDPOINT_HALT, data->bulk_out, buffer, | ||
356 | 0, USBTMC_TIMEOUT); | ||
357 | 352 | ||
358 | if (rv < 0) { | 353 | if (rv < 0) { |
359 | dev_err(dev, "usb_control_msg returned %d\n", rv); | 354 | dev_err(dev, "usb_control_msg returned %d\n", rv); |
@@ -708,14 +703,8 @@ usbtmc_clear_check_status: | |||
708 | 703 | ||
709 | usbtmc_clear_bulk_out_halt: | 704 | usbtmc_clear_bulk_out_halt: |
710 | 705 | ||
711 | rv = usb_control_msg(data->usb_dev, | 706 | rv = usb_clear_halt(data->usb_dev, |
712 | usb_sndctrlpipe(data->usb_dev, 0), | 707 | usb_sndbulkpipe(data->usb_dev, data->bulk_out)); |
713 | USB_REQ_CLEAR_FEATURE, | ||
714 | USB_DIR_OUT | USB_TYPE_STANDARD | | ||
715 | USB_RECIP_ENDPOINT, | ||
716 | USB_ENDPOINT_HALT, | ||
717 | data->bulk_out, buffer, 0, | ||
718 | USBTMC_TIMEOUT); | ||
719 | if (rv < 0) { | 708 | if (rv < 0) { |
720 | dev_err(dev, "usb_control_msg returned %d\n", rv); | 709 | dev_err(dev, "usb_control_msg returned %d\n", rv); |
721 | goto exit; | 710 | goto exit; |
@@ -736,13 +725,8 @@ static int usbtmc_ioctl_clear_out_halt(struct usbtmc_device_data *data) | |||
736 | if (!buffer) | 725 | if (!buffer) |
737 | return -ENOMEM; | 726 | return -ENOMEM; |
738 | 727 | ||
739 | rv = usb_control_msg(data->usb_dev, | 728 | rv = usb_clear_halt(data->usb_dev, |
740 | usb_sndctrlpipe(data->usb_dev, 0), | 729 | usb_sndbulkpipe(data->usb_dev, data->bulk_out)); |
741 | USB_REQ_CLEAR_FEATURE, | ||
742 | USB_DIR_OUT | USB_TYPE_STANDARD | | ||
743 | USB_RECIP_ENDPOINT, | ||
744 | USB_ENDPOINT_HALT, data->bulk_out, | ||
745 | buffer, 0, USBTMC_TIMEOUT); | ||
746 | 730 | ||
747 | if (rv < 0) { | 731 | if (rv < 0) { |
748 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", | 732 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", |
@@ -765,12 +749,8 @@ static int usbtmc_ioctl_clear_in_halt(struct usbtmc_device_data *data) | |||
765 | if (!buffer) | 749 | if (!buffer) |
766 | return -ENOMEM; | 750 | return -ENOMEM; |
767 | 751 | ||
768 | rv = usb_control_msg(data->usb_dev, usb_sndctrlpipe(data->usb_dev, 0), | 752 | rv = usb_clear_halt(data->usb_dev, |
769 | USB_REQ_CLEAR_FEATURE, | 753 | usb_rcvbulkpipe(data->usb_dev, data->bulk_in)); |
770 | USB_DIR_OUT | USB_TYPE_STANDARD | | ||
771 | USB_RECIP_ENDPOINT, | ||
772 | USB_ENDPOINT_HALT, data->bulk_in, buffer, 0, | ||
773 | USBTMC_TIMEOUT); | ||
774 | 754 | ||
775 | if (rv < 0) { | 755 | if (rv < 0) { |
776 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", | 756 | dev_err(&data->usb_dev->dev, "usb_control_msg returned %d\n", |