From: Johan Hovold Date: Tue, 26 May 2015 13:29:18 +0000 (+0200) Subject: greybus: operation: add support for incoming unidirectional operations X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1518^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1d771fe41e629fad9077a0a1a9cf2771c9a5287d;p=karo-tx-linux.git 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 --- 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,