OSDN Git Service

greybus: send operation response messages
authorAlex Elder <elder@linaro.org>
Tue, 2 Dec 2014 14:30:39 +0000 (08:30 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Dec 2014 22:44:11 +0000 (14:44 -0800)
commit82e26f73b2a8ee4acc2507494430aa5774da2b74
treead2f8c6dfb17433461a8b0b5b00b5bba294965f9
parent0c90fff4e35c1322a52709f17d630431c7deb931
greybus: send operation response messages

Define a helper function gb_operation_response_alloc() and use it
to allocate the response buffer for outgoing operations in
gb_operation_create_common(.

Use it also in  gb_operation_response_send() if the caller has not
allocated a response buffer.

Once a response buffer is allocated, fill in its result code and
send it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c
drivers/staging/greybus/operation.h