aboutsummaryrefslogtreecommitdiff
path: root/src/libusb1-glue.c
diff options
context:
space:
mode:
authorLinus Walleij <triad@df.lth.se>2013-11-06 04:29:40 +0100
committerLinus Walleij <triad@df.lth.se>2013-11-06 04:29:40 +0100
commit1bc3a75fa2223884900136201d74905a0ad01426 (patch)
tree94cb387af7703855dbede70ddeafd7c89dda12f2 /src/libusb1-glue.c
parentb9a840cc79bb96f135fe4abd4248881240026112 (diff)
downloadlibmtp-1bc3a75fa2223884900136201d74905a0ad01426.tar.gz
delete unused clear_halt()code
Signed-off-by: Linus Walleij <triad@df.lth.se>
Diffstat (limited to 'src/libusb1-glue.c')
-rw-r--r--src/libusb1-glue.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/libusb1-glue.c b/src/libusb1-glue.c
index 3a6552e..d8bc33b 100644
--- a/src/libusb1-glue.c
+++ b/src/libusb1-glue.c
@@ -2338,7 +2338,7 @@ static void clear_stall(PTP_USB* ptp_usb)
perror("outep: usb_get_endpoint_status()");
} else if (status) {
LIBMTP_INFO("Clearing stall on OUT endpoint\n");
- ret = libusb_clear_halt (ptp_usb->handle, ptp_usb->outep);
+ ret = libusb_clear_halt(ptp_usb->handle, ptp_usb->outep);
if (ret != LIBUSB_SUCCESS) {
perror("usb_clear_stall_feature()");
}
@@ -2347,24 +2347,6 @@ static void clear_stall(PTP_USB* ptp_usb)
/* TODO: do we need this for INTERRUPT (ptp_usb->intep) too? */
}
-static void clear_halt(PTP_USB* ptp_usb)
-{
- int ret;
-
- ret = libusb_clear_halt(ptp_usb->handle,ptp_usb->inep);
- if (ret<0) {
- perror("usb_clear_halt() on IN endpoint");
- }
- ret = libusb_clear_halt(ptp_usb->handle,ptp_usb->outep);
- if (ret<0) {
- perror("usb_clear_halt() on OUT endpoint");
- }
- ret = libusb_clear_halt(ptp_usb->handle,ptp_usb->intep);
- if (ret<0) {
- perror("usb_clear_halt() on INTERRUPT endpoint");
- }
-}
-
static void close_usb(PTP_USB* ptp_usb)
{
if (!FLAG_NO_RELEASE_INTERFACE(ptp_usb)) {
@@ -2379,15 +2361,6 @@ static void close_usb(PTP_USB* ptp_usb)
* STALL is persistant or not).
*/
clear_stall(ptp_usb);
-#if 0
- // causes hangs on Linux 3.x at least up to 3.8
- // Clear halts on any endpoints
- clear_halt(ptp_usb);
- // Added to clear some stuff on the OUT endpoint
- // TODO: is this good on the Mac too?
- // HINT: some devices may need that you comment these two out too.
- libusb_clear_halt(ptp_usb->handle, ptp_usb->outep);
-#endif
libusb_release_interface(ptp_usb->handle, (int) ptp_usb->interface);
}
if (FLAG_FORCE_RESET_ON_CLOSE(ptp_usb)) {