diff options
author | Peter Stuge <peter@stuge.se> | 2010-03-18 12:43:34 +0000 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2010-03-18 12:43:34 +0000 |
commit | b7d9c71fb3c15f1943ec9794504a43f9771e9389 (patch) | |
tree | 69d0670f09b7cd01038928ba235541542d23862a | |
parent | 8978ed4f59b2643ce9fe8adfe0be35595152c26e (diff) | |
download | libusb-b7d9c71fb3c15f1943ec9794504a43f9771e9389.tar.gz |
removed trailing whitespaces (core)
-rw-r--r-- | libusb/core.c | 2 | ||||
-rw-r--r-- | libusb/descriptor.c | 4 | ||||
-rw-r--r-- | libusb/io.c | 24 | ||||
-rw-r--r-- | libusb/libusb.h | 2 | ||||
-rw-r--r-- | libusb/libusbi.h | 10 | ||||
-rw-r--r-- | libusb/sync.c | 2 |
6 files changed, 22 insertions, 22 deletions
diff --git a/libusb/core.c b/libusb/core.c index 47d5108..af3e2fe 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -861,7 +861,7 @@ void usbi_fd_notification(struct libusb_context *ctx) usbi_mutex_lock(&ctx->pollfd_modify_lock); ctx->pollfd_modify--; usbi_mutex_unlock(&ctx->pollfd_modify_lock); - return; + return; } /* take event handling lock */ diff --git a/libusb/descriptor.c b/libusb/descriptor.c index da4dbbe..57e99ed 100644 --- a/libusb/descriptor.c +++ b/libusb/descriptor.c @@ -176,7 +176,7 @@ static void clear_interface(struct libusb_interface *usb_interface) free((void *) usb_interface->altsetting); usb_interface->altsetting = NULL; } - + } static int parse_interface(libusb_context *ctx, @@ -663,7 +663,7 @@ API_EXPORTED void libusb_free_config_descriptor( /** \ingroup desc * Retrieve a string descriptor in C style ASCII. * - * Wrapper around libusb_get_string_descriptor(). Uses the first language + * Wrapper around libusb_get_string_descriptor(). Uses the first language * supported by the device. * * \param dev a device handle diff --git a/libusb/io.c b/libusb/io.c index a7728e0..dd6229c 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -119,7 +119,7 @@ if (r == 0 && actual_length == sizeof(data)) { * * For details on how to use the synchronous API, see the * \ref syncio "synchronous I/O API documentation" pages. - * + * * \section async The asynchronous interface * * Asynchronous I/O is the most significant new feature in libusb-1.0. @@ -240,7 +240,7 @@ if (r == 0 && actual_length == sizeof(data)) { * -# <b>Completion handling</b>: examine transfer results in the * libusb_transfer structure * -# <b>Deallocation</b>: clean up resources - * + * * * \subsection asyncalloc Allocation * @@ -393,7 +393,7 @@ if (r == 0 && actual_length == sizeof(data)) { * request was not supported. * * \section asyncintr Considerations for interrupt transfers - * + * * All interrupt transfers are performed using the polling interval presented * by the bInterval value of the endpoint descriptor. * @@ -511,12 +511,12 @@ if (r == 0 && actual_length == sizeof(data)) { * -# Repeatedly call libusb_handle_events() in blocking mode from a dedicated * thread. * - * The first option is plainly not very nice, and will cause unnecessary + * The first option is plainly not very nice, and will cause unnecessary * CPU wakeups leading to increased power usage and decreased battery life. * The second option is not very nice either, but may be the nicest option * available to you if the "proper" approach can not be applied to your * application (read on...). - * + * * The recommended option is to integrate libusb with your application main * event loop. libusb exposes a set of file descriptors which allow you to do * this. Your main loop is probably already calling poll() or select() or a @@ -749,7 +749,7 @@ void myfunc() { * the loop, <em>up to 120 seconds later.</em> Clearly a two-minute delay is * undesirable, and don't even think about using short timeouts to circumvent * this issue! - * + * * The solution here is to ensure that no two threads are ever polling the * file descriptors at the same time. A naive implementation of this would * impact the capabilities of the library, so libusb offers the scheme @@ -757,7 +757,7 @@ void myfunc() { * * Before we go any further, it is worth mentioning that all libusb-wrapped * event handling procedures fully adhere to the scheme documented below. - * This includes libusb_handle_events() and all the synchronous I/O functions - + * This includes libusb_handle_events() and all the synchronous I/O functions - * libusb hides this headache from you. You do not need to worry about any * of these issues if you stick to that level. * @@ -845,7 +845,7 @@ if (libusb_try_lock_events(ctx) == 0) { libusb_unlock_event_waiters(ctx); goto retry; } - + libusb_wait_for_event(ctx); } libusb_unlock_event_waiters(ctx); @@ -1477,7 +1477,7 @@ API_EXPORTED int libusb_try_lock_events(libusb_context *ctx) if (r) return 1; - ctx->event_handler_active = 1; + ctx->event_handler_active = 1; return 0; } @@ -1743,7 +1743,7 @@ static int handle_timeouts_locked(struct libusb_context *ctx) (cur_tv->tv_sec == systime.tv_sec && cur_tv->tv_usec > systime.tv_usec)) return 0; - + /* otherwise, we've got an expired timeout to handle */ handle_timeout(transfer); } @@ -2076,7 +2076,7 @@ API_EXPORTED int libusb_pollfds_handle_timeouts(libusb_context *ctx) * need to use this function if you are calling poll() or select() or similar * on libusb's file descriptors yourself - you do not need to use it if you * are calling libusb_handle_events() or a variant directly. - * + * * You should call this function in your main loop in order to determine how * long to wait for select() or poll() to return results. libusb needs to be * called into at this timeout, so you should use it as an upper bound on @@ -2293,7 +2293,7 @@ void usbi_handle_disconnect(struct libusb_device_handle *handle) /* terminate all pending transfers with the LIBUSB_TRANSFER_NO_DEVICE * status code. - * + * * this is a bit tricky because: * 1. we can't do transfer completion while holding flying_transfers_lock * 2. the transfers list can change underneath us - if we were to build a diff --git a/libusb/libusb.h b/libusb/libusb.h index 0127d9f..6e34d28 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -32,7 +32,7 @@ #include <limits.h> /* 'interface' might be defined as a macro on Windows, so we need to - * undefine it so as not to break the current libusb API, because + * undefine it so as not to break the current libusb API, because * libusb_config_descriptor has an 'interface' member * As this can be problematic if you include windows.h after libusb.h * in your sources, we force windows.h to be included first. */ diff --git a/libusb/libusbi.h b/libusb/libusbi.h index d7fd4a4..d109d49 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -39,10 +39,10 @@ struct list_head { struct list_head *prev, *next; }; -/* Get an entry from the list - * ptr - the address of this list_head element in "type" +/* Get an entry from the list + * ptr - the address of this list_head element in "type" * type - the data type that contains "member" - * member - the list_head element in "type" + * member - the list_head element in "type" */ #define list_entry(ptr, type, member) \ ((type *)((uintptr_t)(ptr) - (uintptr_t)(&((type *)0L)->member))) @@ -202,7 +202,7 @@ struct libusb_context { struct list_head open_devs; usbi_mutex_t open_devs_lock; - /* this is a list of in-flight transfer handles, sorted by timeout + /* this is a list of in-flight transfer handles, sorted by timeout * expiration. URBs to timeout the soonest are placed at the beginning of * the list, URBs that will time out later are placed after, and urbs with * infinite timeout are always placed at the very end. */ @@ -705,7 +705,7 @@ struct usbi_os_backend { */ int (*kernel_driver_active)(struct libusb_device_handle *handle, int interface_number); - + /* Detach a kernel driver from an interface. Optional. * * After detaching a kernel driver, the interface should be available diff --git a/libusb/sync.c b/libusb/sync.c index 51db50d..289baaa 100644 --- a/libusb/sync.c +++ b/libusb/sync.c @@ -79,7 +79,7 @@ API_EXPORTED int libusb_control_transfer(libusb_device_handle *dev_handle, if (!transfer) return LIBUSB_ERROR_NO_MEM; - + buffer = malloc(LIBUSB_CONTROL_SETUP_SIZE + wLength); if (!buffer) { libusb_free_transfer(transfer); |