greybus: define connection state
authorAlex Elder <elder@linaro.org>
Wed, 22 Oct 2014 07:04:30 +0000 (02:04 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 22 Oct 2014 09:20:28 +0000 (17:20 +0800)
commit36561f23a80b7c44320f34a3b6e6833616e50200
tree585aeed63253eabe95ea7c43f2e237cb6a4b0564
parente1158df0634ab771297fc7510dd78bcbe83e8c87
greybus: define connection state

Define the state of a connection.  A connection will not be
enabled until it has been successfully set up.  Once it starts
getting torn down its state will move to "being destroyed".

Don't send any operation request messages unless the connection is
enabled.  And drop any incoming messages if if the connection is
not enabled.

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