greybus: connection: move legacy-protocol handling to legacy driver
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 19 Jan 2016 11:51:16 +0000 (12:51 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 19 Jan 2016 20:17:13 +0000 (12:17 -0800)
commit50dfb87865790bf8ef86a1c6898cde4e0df212fd
treedcc58670085cc25125e5cd1c8479fd2440afd8f5
parent84427943d2da5f55d5cc83d83ba2a75c2079d1dd
greybus: connection: move legacy-protocol handling to legacy driver

Move legacy protocol and connection handling to the legacy driver.

Rename the former global functions using a common legacy_ prefix.

Note that all legacy protocols suffer from a connection initialisation
race in that the protocol-specific initialisation, which includes
allocation of protocol-specific state containers, can not happen until
*after* the connection has been enabled. This is a major flaw in the
original design that we can now finally address by converting the legacy
protocol drivers into proper bundle (class) drivers.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c
drivers/staging/greybus/connection.h
drivers/staging/greybus/legacy.c
drivers/staging/greybus/protocol.c