From 1d771fe41e629fad9077a0a1a9cf2771c9a5287d Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 26 May 2015 15:29:18 +0200 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/operation.c | 4 ++++ 1 file changed, 4 insertions(+) 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, -- 2.39.5