[sane-devel] sanei usb improvements
Stef
stef.dev at free.fr
Mon Mar 4 21:07:33 UTC 2013
Hello,
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
current semantics.
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.
The 0003-convert-genesys-backend-to-use-new-sanei_usb-functio.patch
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.
Regards,
Stef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sanei_usb_init.targ.gz
Type: application/x-gzip
Size: 9967 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130304/ec775306/attachment.bin>
More information about the sane-devel
mailing list