[Spice-devel] [PATCH spice-gtk 1/5] usb-device-manager: Avoid needless re-numeration of usb devs under Linux

Christophe Fergeau cfergeau at redhat.com
Tue Apr 23 11:21:07 PDT 2013


On Tue, Apr 23, 2013 at 02:19:48PM +0200, Hans de Goede wrote:
> libusb_get_device_list() is not exactly a cheap call (lots of sysfs and
> usbfs accesses), so it is worth to avoid it where possible.
> 
> This patch restores the old (pre win32 support addition) of dealing with
> libusb-devices under Linux, it keeps the device from the first lookup
> in spice_usb_device_manager_add_dev cached and uses that throughout.
> 
> This also means that spice_usb_device_manager_device_to_libdev can no
> longer fail under Linux, so no need to error check it.

ACK, with the same comment as in one of the following patch about the not
really needed #if OS_WIN32 not improving readibility.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130423/848239d7/attachment.pgp>


More information about the Spice-devel mailing list