projects
/
libam7xxx.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd64a02
)
am7xxx: add comment about detaching kernel drivers before setting configuration
author
Antonio Ospite <ao2@ao2.it>
Mon, 20 Apr 2015 14:32:04 +0000
(16:32 +0200)
committer
Antonio Ospite <ao2@ao2.it>
Mon, 20 Apr 2015 16:03:54 +0000
(18:03 +0200)
src/am7xxx.c
patch
|
blob
|
history
diff --git
a/src/am7xxx.c
b/src/am7xxx.c
index
f4203e3
..
6595ccf
100644
(file)
--- a/
src/am7xxx.c
+++ b/
src/am7xxx.c
@@
-736,6
+736,15
@@
static int open_device(am7xxx_context *ctx,
current_configuration = -1;
libusb_get_configuration((*dev)->usb_device, ¤t_configuration);
if (current_configuration != (*dev)->desc->configuration) {
current_configuration = -1;
libusb_get_configuration((*dev)->usb_device, ¤t_configuration);
if (current_configuration != (*dev)->desc->configuration) {
+ /*
+ * In principle kernel drivers bound to each interface should
+ * be detached before setting the configuration, but in
+ * practice this is not necessary for most devices.
+ *
+ * For example something like the following function would be
+ * called:
+ * libusb_detach_all_kernel_drivers((*dev)->usb_device);
+ */
ret = libusb_set_configuration((*dev)->usb_device,
(*dev)->desc->configuration);
if (ret < 0) {
ret = libusb_set_configuration((*dev)->usb_device,
(*dev)->desc->configuration);
if (ret < 0) {