]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: update operation result atomically
authorAlex Elder <elder@linaro.org>
Tue, 25 Nov 2014 22:54:02 +0000 (16:54 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 25 Nov 2014 23:05:35 +0000 (15:05 -0800)
commit894cbc31360102fe51babdb82be69885f317843b
treed1e55da4044af483889a06943488f11919b970e0
parentaa3a4d12093b818ac2b9fe3e0454ae0090201254
greybus: update operation result atomically

An operation result can be set both in and out of interrupt context.
For example, a response message could be arriving at the same time a
timeout of the operation is getting processed.  We therefore need to
ensure the result is accessed atomically.

Protect updates to the errno field using the operations spinlock.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c