commit | 43a4a04d4ddb268373d5857c7a7bcbe3658e5b48 | [log] [tgz] |
---|---|---|
author | Heiner Kallweit <hkallweit1@gmail.com> | Tue Mar 01 20:49:54 2016 +0100 |
committer | Jiri Kosina <jkosina@suse.cz> | Wed Mar 02 10:20:31 2016 +0100 |
tree | 7bcaa4f2b7774bdfddb465b903c79e9fd05ff83e | |
parent | c46fab28703bf12772b3bdbeabcf90df9cd20d58 [diff] |
HID: thingm: improve locking Reading from the device consists of two operations: sending the read command and the actual read from the device. If the device is accessed in between we might read wrong data. Therefore protect the full sequence of both operations with a mutex. Also change the semantics of thingm_recv to include both operations. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>