From: adam@algroup.co.uk Date: Thu, 25 Jun 2009 13:30:57 +0000 (+0000) Subject: Detach kernel driver X-Git-Tag: v1.0.0~603 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/7fdbe272cf3e9ba9f4c58dc09dc4081cec7db6bc?ds=inline;hp=5aad6db03ca66dfdcea196ec4c3816bf0eac72ed Detach kernel driver --- diff --git a/linux/usb.c b/linux/usb.c index 8145b64a..6337c21a 100644 --- a/linux/usb.c +++ b/linux/usb.c @@ -153,6 +153,11 @@ usb_dev_handle* OpenProxmark(int verbose) { if (!handle) return NULL; + /* detach kernel driver first */ + ret = usb_detach_kernel_driver_np(handle, iface); + /* don't complain if no driver attached */ + if (ret<0 && ret != -61 && verbose) + fprintf(stderr, "detach kernel driver failed: (%d) %s!\n", ret, usb_strerror()); ret = usb_claim_interface(handle, iface); if (ret<0) { if (verbose)