OSDN Git Service

greybus: hd: make svc-connection life time coincide with host-device
authorJohan Hovold <johan@hovoldconsulting.com>
Mon, 7 Dec 2015 14:05:36 +0000 (15:05 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 8 Dec 2015 20:31:14 +0000 (15:31 -0500)
commit2c848944c14cf9c74c298b2459cc39dc3c757f25
tree0391f472ba611a95dff83228acc4a8d4b611143d
parentd4c80bad59dbc69a989ca2c4efbcc0fb772a713b
greybus: hd: make svc-connection life time coincide with host-device

Create the svc-connection as part of the host device, and destroy it in
the host-device destructor.

The svc-connection is enabled when registering the host device, and
disabled when the host device is deregistered.

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