aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-05-11 10:17:57 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-13 15:30:05 +0200
commit781ac8662ffafa89e6675c3eb608ec9c569f24b7 (patch)
tree40b97921509e05a95356b0d8f22f47e6222b1da8 /drivers/staging/greybus/connection.c
parentgreybus: connection: add offloaded connection flag (diff)
downloadlinux-dev-781ac8662ffafa89e6675c3eb608ec9c569f24b7.tar.xz
linux-dev-781ac8662ffafa89e6675c3eb608ec9c569f24b7.zip
greybus: connection: add helper for creating offloaded connection
Add helper for creating offloaded connection. This can later be extended to support more elaborate resource management. Also fix a minor white space issue. 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>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 9e8828109b1e..95855d1cad9f 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -264,6 +264,19 @@ gb_connection_create_flags(struct gb_bundle *bundle, u16 cport_id,
}
EXPORT_SYMBOL_GPL(gb_connection_create_flags);
+struct gb_connection *
+gb_connection_create_offloaded(struct gb_bundle *bundle, u16 cport_id,
+ unsigned long flags)
+{
+ struct gb_interface *intf = bundle->intf;
+
+ flags |= GB_CONNECTION_FLAG_OFFLOADED;
+
+ return _gb_connection_create(intf->hd, -1, intf, bundle, cport_id,
+ NULL, flags);
+}
+EXPORT_SYMBOL_GPL(gb_connection_create_offloaded);
+
static int gb_connection_hd_cport_enable(struct gb_connection *connection)
{
struct gb_host_device *hd = connection->hd;