linux: Move check for a device being added twice to linux_enumerate_device
authorHans de Goede <hdegoede@redhat.com>
Thu, 16 May 2013 15:02:08 +0000 (17:02 +0200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 16 May 2013 15:18:33 +0000 (17:18 +0200)
commitf168b3d23f8cff5d5986ddbd7c0dffcd5cb91347
tree22951b587caeef28b1c59157224e5baa9a3edea7
parent9f679a9c9abc430614f9d6654c40bee9c64c84be
linux: Move check for a device being added twice to linux_enumerate_device

It is possible for a device to show up between the hotplug code starting to
listen for new devices, and the enumeration of existing devices. This will
cause a device to get enumerated twice.

The next patch in this series adds a different code path which can cause
a device to be enumerated twice, this patch therefor moves the check for
this to linux_enumerate_device, so that this will get caught in all cases.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libusb/os/linux_usbfs.c
libusb/version_nano.h