diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-05-26 15:29:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-05-26 15:25:17 -0700 |
commit | 1d771fe41e629fad9077a0a1a9cf2771c9a5287d (patch) | |
tree | bc1fb6bfefa95076cf2453f4f11be44f94a0fb79 /drivers/staging/greybus/operation.c | |
parent | d67a39ab38118b0d5ddfd45626d60088fa9a0021 (diff) |
greybus: operation: add support for incoming unidirectional operations
Add support for incoming, unidirectional operations where the sender of
a request does not care about a response.
Unidirectional operations have an operation id of 0.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/operation.c')
-rw-r--r-- | drivers/staging/greybus/operation.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index f595b97fa900..4f7a555e4b96 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -686,6 +686,10 @@ int gb_operation_response_send(struct gb_operation *operation, int errno) return -EIO; /* Shouldn't happen */ } + /* Sender of request does not care about response. */ + if (!operation->id) + return 0; + if (!operation->response) { if (!gb_operation_response_alloc(operation, 0)) { dev_err(&connection->dev, |