From: Egbert Eich <e...@suse.com> usbFindDeviceType() is only called once. From where it is called, it is only called if event->value != 0 and with ds->device_id = event->value. Thus the test !ds->device_id will always fail.
Signed-off-by: Egbert Eich <e...@suse.com> --- src/wcmUSB.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/wcmUSB.c b/src/wcmUSB.c index e22cd5e..14fff1b 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c @@ -1092,20 +1092,9 @@ static int usbIdToType(int id) static int usbFindDeviceType(const WacomCommonPtr common, const WacomDeviceState *ds) { - WacomToolPtr tool = NULL; int device_type = 0; - if (!ds->device_id && ds->serial_num) - { - for (tool = common->wcmTool; tool; tool = tool->next) - if (ds->serial_num == tool->serial) - { - device_type = tool->typeid; - break; - } - } - - if (device_type || !ds->device_id) return device_type; + if (!ds->device_id) return 0; switch (ds->device_id) { -- 1.8.4.5 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel