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 ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel