summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2015-10-17 01:56:38 +0200
committerGreg Kroah-Hartman2015-10-19 21:09:10 +0200
commitb750fa3370485356b5cddda7c0f7fc9bea056fa8 (patch)
tree64ad54bfb8a89e7ed54d2366aa547c325e8b2fde /drivers/staging/greybus/connection.h
parentgreybus: sdio: some cleanups in command function (diff)
downloadkernel-qcow2-linux-b750fa3370485356b5cddda7c0f7fc9bea056fa8.tar.gz
kernel-qcow2-linux-b750fa3370485356b5cddda7c0f7fc9bea056fa8.tar.xz
kernel-qcow2-linux-b750fa3370485356b5cddda7c0f7fc9bea056fa8.zip
greybus: connection: remove 'struct device' from 'struct gb_connection'
We don't want this in the driver core, as nothing will be binding to it, that's the job of a bundle. So remove the struct device and use a kref to handle reference counting instead. Note, I don't think we really need a kref, but it keeps the lifetime the same as before, and is the simplest change for now. In the future it might be easier to just attach all connections to the bundle and clean them up when the bundle is removed. Also remove the cport sysfs documentation as it's no longer relevant. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Diffstat (limited to 'drivers/staging/greybus/connection.h')
-rw-r--r--drivers/staging/greybus/connection.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h
index 2eaf186ab60e..af425a2dc5d2 100644
--- a/drivers/staging/greybus/connection.h
+++ b/drivers/staging/greybus/connection.h
@@ -24,7 +24,7 @@ enum gb_connection_state {
struct gb_connection {
struct greybus_host_device *hd;
struct gb_bundle *bundle;
- struct device dev;
+ struct kref kref;
u16 hd_cport_id;
u16 intf_cport_id;
@@ -48,7 +48,6 @@ struct gb_connection {
void *private;
};
-#define to_gb_connection(d) container_of(d, struct gb_connection, dev)
int svc_update_connection(struct gb_interface *intf,
struct gb_connection *connection);