summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/connection.c6
-rw-r--r--drivers/staging/greybus/connection.h1
-rw-r--r--drivers/staging/greybus/control.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 9b8112bd16a0..f81f053a2e98 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -223,6 +223,12 @@ gb_connection_create_static(struct gb_host_device *hd, u16 hd_cport_id)
}
struct gb_connection *
+gb_connection_create_control(struct gb_interface *intf)
+{
+ return gb_connection_create(intf->hd, -1, intf, NULL, 0, 0);
+}
+
+struct gb_connection *
gb_connection_create_dynamic(struct gb_interface *intf,
struct gb_bundle *bundle,
u16 cport_id, u8 protocol_id)
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h
index 562bd2b47ac5..cd4a093f6e9b 100644
--- a/drivers/staging/greybus/connection.h
+++ b/drivers/staging/greybus/connection.h
@@ -57,6 +57,7 @@ struct gb_connection {
struct gb_connection *gb_connection_create_static(struct gb_host_device *hd,
u16 hd_cport_id);
+struct gb_connection *gb_connection_create_control(struct gb_interface *intf);
struct gb_connection *gb_connection_create_dynamic(struct gb_interface *intf,
struct gb_bundle *bundle, u16 cport_id,
u8 protocol_id);
diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c
index 0e50fd419f3a..a766ec8b0228 100644
--- a/drivers/staging/greybus/control.c
+++ b/drivers/staging/greybus/control.c
@@ -186,9 +186,7 @@ struct gb_control *gb_control_create(struct gb_interface *intf)
if (!control)
return NULL;
- control->connection = gb_connection_create_dynamic(intf, NULL,
- GB_CONTROL_CPORT_ID,
- GREYBUS_PROTOCOL_CONTROL);
+ control->connection = gb_connection_create_control(intf);
if (!control->connection) {
dev_err(&intf->dev, "failed to create control connection\n");
kfree(control);