summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/operation.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2014-12-02 08:30:39 -0600
committerGreg Kroah-Hartman <greg@kroah.com>2014-12-02 14:44:11 -0800
commit82e26f73b2a8ee4acc2507494430aa5774da2b74 (patch)
treead2f8c6dfb17433461a8b0b5b00b5bba294965f9 /drivers/staging/greybus/operation.h
parent0c90fff4e35c1322a52709f17d630431c7deb931 (diff)
greybus: send operation response messages
Define a helper function gb_operation_response_alloc() and use it to allocate the response buffer for outgoing operations in gb_operation_create_common(. Use it also in gb_operation_response_send() if the caller has not allocated a response buffer. Once a response buffer is allocated, fill in its result code and send it. 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h
index adaec7c43ea9..c60decb40539 100644
--- a/drivers/staging/greybus/operation.h
+++ b/drivers/staging/greybus/operation.h
@@ -98,6 +98,9 @@ static inline void gb_operation_destroy(struct gb_operation *operation)
gb_operation_put(operation);
}
+bool gb_operation_response_alloc(struct gb_operation *operation,
+ size_t response_size);
+
int gb_operation_request_send(struct gb_operation *operation,
gb_operation_callback callback);
int gb_operation_response_send(struct gb_operation *operation, int errno);