Stef writes: > On 05/03/2013 01:35, Olaf Meeuwissen wrote: >> Stef writes: >> >>> here's a patch set to improve sanei_usb to review. >> Patches 2, 3 and 4 are fine with me but the first patch mixes several >> changes that make it unnecessarily hard to review. Could split that >> patch so it focusses on the advertised changeset and refrain from the >> small changes in whitespace, comments and debugging feedback?
Sorry for the late follow-up. I don't care for the later patches so I only looked at: 0001-sanei_usb_init-rework.patch 0002-add-sanei_usb_exit-function.patch The call to kernel_scan_devices() in sanei_usb_scan_devices() struck me as odd. At least for linux-2.6.3 or later it is not needed because there is no kernel scanner module anymore. But looking at the code, I noticed that it may be necessary on other OSs. Still, if using one of the libusb libraries on any OS, you should be fine without the kernel scan, no? In sanei_usb_exit() you should reset sanei_usb_ctx to NULL because you check for it in sanei_usb_init(). This should be fixed. As a matter of style, in sanei_usb_exit(), I would put the "int i" in the "if (initialized==0)" branch, limiting its existence to the scope where it is needed. I'll leave commenting on usbcall_scan_devices() to somebody who is familiar with that API (but it looks like you just lifted that from its original location) and I skipped all the changes you made to the debugging messages in the first patch (as these are off-topic). Hope this helps, -- Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION FSF Associate Member #1962 Help support software freedom http://www.fsf.org/jf?referrer=1962