]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
greybus: use operation type 0 to signal incoming data
authorAlex Elder <elder@linaro.org>
Tue, 2 Dec 2014 14:30:32 +0000 (08:30 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Dec 2014 22:39:42 +0000 (14:39 -0800)
commitea64cd9a5e83605bdb6374b48d3aa84f0d08abde
tree4441b0054f6f644d94d58438613b255cce9fb7d7
parent55f66a88dbd718c2133ac759eee4ff51f516bf45
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>
drivers/staging/greybus/operation.c