summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-07-29 23:38:26 +0100
committerPete Batard <pbatard@gmail.com>2010-07-29 23:38:26 +0100
commit543371cc8fb78b5bf4ea69b9fff6824332155e5a (patch)
tree4f3f3756b7b86ba1a87a3873ed92a0d79720ed68
parent5eb857963eb6e16f461abaef0ee83bbca6bc663b (diff)
downloadlibusb-543371cc8fb78b5bf4ea69b9fff6824332155e5a.tar.gz
more residuals from official: core
-rw-r--r--libusb/core.c3
-rw-r--r--libusb/libusb.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/libusb/core.c b/libusb/core.c
index 5104f68..1d5c9b3 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -312,7 +312,7 @@ if (cfg != desired)
* The default context is reference-counted and can be shared. That means that
* if libusb_init(NULL) is called twice within the same process, the two
* users end up sharing the same context. The deinitialization and freeing of
- * the default context will only happen when the last user calls libusb_exit()
+ * the default context will only happen when the last user calls libusb_exit().
* In other words, the default context is created and initialized when its
* reference count goes from 0 to 1, and is deinitialized and destroyed when
* its reference count goes from 1 to 0.
@@ -1560,7 +1560,6 @@ API_EXPORTED int LIBUSB_API libusb_init(libusb_context **context)
usbi_default_context = ctx;
default_context_refcnt++;
}
- usbi_mutex_static_unlock(&default_context_lock);
return 0;
diff --git a/libusb/libusb.h b/libusb/libusb.h
index 7e31b60..31500f0 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -1206,7 +1206,7 @@ static inline int libusb_get_string_descriptor(libusb_device_handle *dev,
uint8_t desc_index, uint16_t langid, unsigned char *data, int length)
{
return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN,
- LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t)((LIBUSB_DT_STRING << 8) | desc_index),
+ LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_STRING << 8) | desc_index,
langid, data, (uint16_t) length, 1000);
}