On Tue, Mar 11, 2014 at 12:31 PM, Egbert Eich <e...@freedesktop.org> wrote: > 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. >
The comment for the usbFindDeviceType needs to be updated to remove the clause "or current tool serial number if the device_id is unknown (0)" since that logic has been removed. With that change: Reviewed-by: Jason Gerecke <killert...@gmail.com> > 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 > ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel