OSDN Git Service

greybus: record type in operation structure
authorAlex Elder <elder@linaro.org>
Wed, 3 Dec 2014 18:27:46 +0000 (12:27 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 3 Dec 2014 23:09:12 +0000 (15:09 -0800)
commit82b5e3feb71482fe63f3c62d81a1528a890dfe74
tree142dee50ec94321f1472214262583834db728822
parent746e0ef95ade8dd6d8633679a87ab573b5e1f69e
greybus: record type in operation structure

I've gone back and forth on this, but now that I'm looking at
asynchronous operations I know that the asynchronous callback will
want to know what type of operation it is handling, and right now
that's only available in the message header.

So record an operation's type in the operation structure, and use
it in a few spots where the header type was being used previously.
Pass the type to gb_operation_create_incoming() so it can fill
it in after the operation has been created.

Clean up the crap comments above the definition of the operation
structure.

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