On Tuesday, 18. May 2010 13:43:53 Xiaofan Chen wrote:
> That is exactly right. And I think failure to detach the kernel driver is
> quite normal (eg: you already run libftdi once and the kernel driver
> is already detached) and should not return error. A warning is enough.
>
> ret = libusb_detach_kernel_driver(ftdi->usb_dev, ftdi->interface);
> if (ret < 0 && ret != LIBUSB_ERROR_NOT_FOUND)
> ftdi_error_return(-11, "libusb_detach_kernel_driver () failed");
That's the reason we already ignore LIBUSB_ERROR_NOT_FOUND ;) I never had
trouble with the detach code. If the detach really fails
(except _NOT_FOUND and _NOT_SUPPORTED), then we should abort with an error.
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|