greybus: loopback: register a struct device.
authorAxel Haslam <ahaslam@baylibre.com>
Fri, 11 Dec 2015 10:49:45 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 12 Dec 2015 00:04:40 +0000 (16:04 -0800)
commit079fa32ba53a205a745e75b045361beeffdfeaba
tree93ddbe39f46547c9206c408b0fa5a735bc3a116c
parent3647a313de367e98840c4dfab491dfbeaf2cf9a4
greybus: loopback: register a struct device.

Instead of having the loopback attributes in the bundle device,
Add a struct device to the gb_loopback struct and register it on
connection_init, deregister it at connection_exit, and move the
loopback attribute group over to the new device.

Use device_create_with_groups to create sysfs attributes
together with device.

Suggested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Suggested-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/loopback.c