[sane-devel] sanei usb improvements
stef.dev at free.fr
Mon Mar 4 21:07:33 UTC 2013
here's a patch set to improve sanei_usb to review.
The first 0001-sanei_usb_init-rework.patch move device scanning logic
from sanei_usb_init() to a new sanei_usb_scan_devices() function.
sanei_usb_init() keeps only the initialization code.
sanei_usb_scan_devices() can be called repeatedly to update the device
list. With this, a backend has to call sanei_usb_init() only once. I
have separated the device scanning code into several functions (one by
scanning method) to make easier to read and maintain. sanei_usb_init()
still calls the new sanei_usb_scan_devices() function to preserve
The 0002-add-sanei_usb_exit-function.patch adds a function to
release allocated resources by sanei_usb_init(). This allow to take care
of the small memleaks currently taking place.
patch changes the genesys backend to use the new functions.
And the 0004-improve-missing-test-logic.patch is a small code
cleanup (merging some if).
I could test the libusb/libus-1.0 cases, but I couldn't compile for
OS/2, since I don't have a setup for that.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9967 bytes
Desc: not available
More information about the sane-devel