summaryrefslogtreecommitdiffstats
path: root/usbmuxd/usb-linux.c
diff options
context:
space:
mode:
authorGravatar Hector Martin2009-08-19 01:39:16 +0200
committerGravatar Hector Martin2009-08-19 03:56:09 +0200
commitacfba6464bd57bdd0549f083f83b12ff9909337f (patch)
tree824f942e9ffef08d241d268f407c9b4ccd19f785 /usbmuxd/usb-linux.c
parent3a6f72edfb352ab57f58fb4fe4b6314daaddb362 (diff)
downloadusbmuxd-acfba6464bd57bdd0549f083f83b12ff9909337f.tar.gz
usbmuxd-acfba6464bd57bdd0549f083f83b12ff9909337f.tar.bz2
Remove trailing whitespace errors
Diffstat (limited to 'usbmuxd/usb-linux.c')
-rw-r--r--usbmuxd/usb-linux.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usbmuxd/usb-linux.c b/usbmuxd/usb-linux.c
index a5fc6a0..6e99a95 100644
--- a/usbmuxd/usb-linux.c
+++ b/usbmuxd/usb-linux.c
@@ -58,7 +58,7 @@ static void usb_disconnect(struct usb_device *dev)
if(!dev->dev) {
return;
}
-
+
// kill the rx xfer and tx xfers and try to make sure the callbacks get called before we free the device
if(dev->rx_xfer) {
usbmuxd_log(LL_DEBUG, "usb_disconnect: cancelling RX xfer");
@@ -72,7 +72,7 @@ static void usb_disconnect(struct usb_device *dev)
while(dev->rx_xfer || collection_count(&dev->tx_xfers)) {
struct timeval tv;
int res;
-
+
tv.tv_sec = 0;
tv.tv_usec = 1000;
if((res = libusb_handle_events_timeout(NULL, &tv)) < 0) {
@@ -218,7 +218,7 @@ static int usb_discover(void)
int cnt, i, res;
int valid_count = 0;
libusb_device **devs;
-
+
cnt = libusb_get_device_list(NULL, &devs);
if(cnt < 0) {
usbmuxd_log(LL_WARNING, "Could not get device list: %d", cnt);
@@ -309,7 +309,7 @@ static int usb_discover(void)
collection_init(&usbdev->tx_xfers);
collection_add(&device_list, usbdev);
-
+
if(device_add(usbdev) < 0) {
usb_disconnect(usbdev);
continue;
@@ -327,14 +327,14 @@ static int usb_discover(void)
usb_disconnect(usbdev);
}
} ENDFOREACH
-
+
libusb_free_device_list(devs, 1);
-
+
gettimeofday(&next_dev_poll_time, NULL);
next_dev_poll_time.tv_usec += DEVICE_POLL_TIME * 1000;
next_dev_poll_time.tv_sec += next_dev_poll_time.tv_usec / 1000000;
next_dev_poll_time.tv_usec = next_dev_poll_time.tv_usec % 1000000;
-
+
return valid_count;
}
@@ -477,7 +477,7 @@ int usb_init(void)
{
int res;
usbmuxd_log(LL_DEBUG, "usb_init for linux / libusb 1.0");
-
+
devlist_failures = 0;
res = libusb_init(NULL);
//libusb_set_debug(NULL, 3);
@@ -485,9 +485,9 @@ int usb_init(void)
usbmuxd_log(LL_FATAL, "libusb_init failed: %d", res);
return -1;
}
-
+
collection_init(&device_list);
-
+
return usb_discover();
}