summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/operation.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2014-11-25 11:33:13 -0600
committerGreg Kroah-Hartman <greg@kroah.com>2014-11-25 10:49:51 -0800
commitba986b5ab97f59669cc5d174a8a7359b8600e2e5 (patch)
tree3a70924a45d3c21050a373886483904e28a7abb5 /drivers/staging/greybus/operation.h
parent9f240f20caf93090d82949d59d467dcde341560b (diff)
downloadlinux-ba986b5ab97f59669cc5d174a8a7359b8600e2e5.tar.bz2
greybus: encapsulate operation result access
Hide the setting and getting of the operation result (stored in operation->errno) behind a pair of accessor functions. Only the operation core should be setting the result, but operations that complete asynchronously will need access to the result so expose the function that provides that. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'drivers/staging/greybus/operation.h')
-rw-r--r--drivers/staging/greybus/operation.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h
index bc5c1641e1ac..7f835d2e8f35 100644
--- a/drivers/staging/greybus/operation.h
+++ b/drivers/staging/greybus/operation.h
@@ -84,6 +84,8 @@ struct gb_operation {
void gb_connection_recv(struct gb_connection *connection,
void *data, size_t size);
+int gb_operation_result(struct gb_operation *operation);
+
struct gb_operation *gb_operation_create(struct gb_connection *connection,
u8 type, size_t request_size,
size_t response_size);