diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-07-14 15:43:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-07-15 12:39:13 -0700 |
commit | 129a06f541d3ff4228589b4b9f0a4681dafb0042 (patch) | |
tree | d5c785b467b770707899a8fbf3e76443337379ae /drivers/staging/greybus/operation.h | |
parent | 4f2c08aba792d4c778774e90e47865718eb1b7f8 (diff) |
greybus: operation: add gb_operation_sync_timeout helper
Add gb_operation_sync_timeout convenience function, which allows drivers
to configure the operation timeout.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/operation.h')
-rw-r--r-- | drivers/staging/greybus/operation.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h index f06dd11e0afb..685470349460 100644 --- a/drivers/staging/greybus/operation.h +++ b/drivers/staging/greybus/operation.h @@ -186,9 +186,19 @@ void gb_operation_cancel_incoming(struct gb_operation *operation, int errno); void greybus_message_sent(struct greybus_host_device *hd, struct gb_message *message, int status); -int gb_operation_sync(struct gb_connection *connection, int type, +int gb_operation_sync_timeout(struct gb_connection *connection, int type, + void *request, int request_size, + void *response, int response_size, + unsigned int timeout); + +static inline int gb_operation_sync(struct gb_connection *connection, int type, void *request, int request_size, - void *response, int response_size); + void *response, int response_size) +{ + return gb_operation_sync_timeout(connection, type, + request, request_size, response, response_size, + GB_OPERATION_TIMEOUT_DEFAULT); +} int gb_operation_init(void); void gb_operation_exit(void); |