greybus: svc: make svc a device
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 25 Nov 2015 14:59:06 +0000 (15:59 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 25 Nov 2015 23:30:03 +0000 (15:30 -0800)
commitefe6ef76ba97f20302d200368d9f99848350bae1
tree920071419cb19502b0496a07f66251a32dfe4193
parentf0172c7043d772ed0d198046cb6142dd91ab2a5a
greybus: svc: make svc a device

Make the svc object a child device of the host-device device and use
driver core to manage its lifetime.

The svc device name is "<bus_id>-svc", where bus_id is the dynamically
assigned id of the host device.

Note that there is exactly one svc-device per host device (bus).

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