Extend the autodetach behavior

Detach interfaces before trying to change the config, as libusb doesn't handle that automatically.
This commit is contained in:
Nico MT
2017-07-21 21:15:49 +02:00
committed by zagrodzki
parent 9829f2fcba
commit bc91dd3f2c
6 changed files with 79 additions and 6 deletions

View File

@@ -114,6 +114,8 @@ func (f *fakeLibusb) getStringDesc(*libusbDevHandle, int) (string, error) {
}
func (f *fakeLibusb) setAutoDetach(*libusbDevHandle, int) error { return nil }
func (f *fakeLibusb) detachKernelDriver(*libusbDevHandle, uint8) error { return nil }
func (f *fakeLibusb) claim(d *libusbDevHandle, intf uint8) error {
debug.Printf("claim(%p, %d)\n", d, intf)
f.mu.Lock()