mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
tools/lib/atusb.c: eliminated global variable to allow for multiple sessions
- atusb.c: introduced descriptor structure, replacing direct USB device handle - atusb.c (error): moved global variable into descriptor - driver.h (atusb_dev_handle), atusb.c (atusb_dev_handle), atrf.c (atrf_usb_handle): call driver to perform the no longer trivial translation
This commit is contained in:
@@ -44,7 +44,7 @@ void *atrf_usb_handle(struct atrf_dsc *dsc)
|
||||
{
|
||||
#ifdef HAVE_USB
|
||||
if (dsc->driver == &atusb_driver)
|
||||
return dsc->handle;
|
||||
return atusb_dev_handle(dsc->handle);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user