[FE training-materials-updates] Silence the call to detach_driver
Maxime Ripard
maxime.ripard at free-electrons.com
Thu Mar 21 17:17:46 CET 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : various-fixes
Link : http://git.free-electrons.com/training-materials/commit/?id=53b46d53caba0ca207e189ee4cd42a732c0e5082
>---------------------------------------------------------------
commit 53b46d53caba0ca207e189ee4cd42a732c0e5082
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date: Thu Mar 21 17:15:35 2013 +0100
Silence the call to detach_driver
Most of the time, the call will fail since there is no actual driver
attached, but it's an expected behaviour, so we don't have to mention
it to the user.
Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
>---------------------------------------------------------------
53b46d53caba0ca207e189ee4cd42a732c0e5082
lab-data/android/native-app/mlbin.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/lab-data/android/native-app/mlbin.c b/lab-data/android/native-app/mlbin.c
index 60b520e..1938f0f 100644
--- a/lab-data/android/native-app/mlbin.c
+++ b/lab-data/android/native-app/mlbin.c
@@ -59,11 +59,7 @@ int mlbin_init_usb(void)
goto open_dev_error;
}
- ret = libusb_detach_kernel_driver(devh, 0);
- if (ret) {
- printf("Couldn't detach kernel driver: %d\n", ret);
- }
-
+ libusb_detach_kernel_driver(devh, 0);
ret = libusb_claim_interface(devh, 0);
if(ret < 0) {
printf("Couldn't claim the interface : %d.\n", ret);
More information about the training-materials-updates
mailing list