diff options
author | 2014-11-24 11:19:13 -0800 | |
---|---|---|
committer | 2014-11-24 12:56:51 -0800 | |
commit | 10aa801d331609c38a58e0c4e73fd31103ffa230 (patch) | |
tree | a7663850a4645e2e74ccda07820a8bfc0cac80e2 /drivers/staging/greybus/operation.h | |
parent | greybus: rework synchronous operation completion (diff) | |
download | linux-dev-10aa801d331609c38a58e0c4e73fd31103ffa230.tar.xz linux-dev-10aa801d331609c38a58e0c4e73fd31103ffa230.zip |
greybus: operation: create gb_operation_sync for sending "simple" messages
Everyone keeps doing the same create/send/destroy logic all over the
place, so abstract that out to a simple function that can handle any
arbritrary request and/or response. This will let us save lots of
duplicated logic in the protocol drivers.
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/operation.h')
-rw-r--r-- | drivers/staging/greybus/operation.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h index c391b28a4ca7..bc5c1641e1ac 100644 --- a/drivers/staging/greybus/operation.h +++ b/drivers/staging/greybus/operation.h @@ -105,6 +105,10 @@ int gb_operation_status_map(u8 status); void greybus_data_sent(struct greybus_host_device *hd, void *header, int status); +int gb_operation_sync(struct gb_connection *connection, int type, + void *request, int request_size, + void *response, int response_size); + int gb_operation_init(void); void gb_operation_exit(void); |