greybus: use operation type 0 to signal incoming data

When incoming data is going to be handled as a request, we create a
new operation whose request buffer will hold the received data.
There is no need to initialize the message header in such a request
buffer because it will be immediately overwritten.

Use operation type value of 0x00 in gb_operation_create_common()
to signal that we are creating an incoming operation, and therefore
do not need to initialize the request message header.  This allows
us to get rid of the Boolean "outgoing" parameter.

As a result, we can stop supplying the "type" parameter to both
gb_operation_create_incoming() and gb_connection_recv_request().

Update the header comments for gb_operation_message_alloc() and
gb_operation_create_common().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
1 file changed
tree: 4441b0054f6f644d94d58438613b255cce9fb7d7
  1. drivers/