OSDN Git Service

greybus: operation: add incoming-operation flag
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 1 Jul 2015 10:37:26 +0000 (12:37 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jul 2015 23:50:59 +0000 (16:50 -0700)
commit710067e2ef42473c823fc8176ca9536b1a42c491
tree3090a3a80556b1498e450b93a5afe815d44e63e1
parent73f9d73f124ccba16403971b5101d4a947161481
greybus: operation: add incoming-operation flag

Add flag field to struct gb_operation, and a first flag
GB_OPERATION_FLAG_INCOMING to identify incoming operations.

Pass an initial set of flags when allocating new operations, and use
these to identify incoming operations rather than overloading the
meaning of GB_OPERATION_TYPE_INVALID. This also allows us to set the
type for all operations during allocation.

Also add convenience helper to identify incoming operations.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/operation.c
drivers/staging/greybus/operation.h