From 4ec1574ae99872a9d1922fb1e57b8d46df4d0920 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Wed, 25 Nov 2015 15:59:13 +0100 Subject: greybus: connection: kill GB_PROTOCOL_SKIP_SVC_CONNECTION Add helper to determine whether a connection is static, and remove the protocol flag GB_PROTOCOL_SKIP_SVC_CONNECTION. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/connection.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/staging/greybus/connection.c') diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index a7b803799fa5..3f2fe0103547 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -289,11 +289,10 @@ static int gb_connection_svc_connection_create(struct gb_connection *connection) { struct gb_host_device *hd = connection->hd; - struct gb_protocol *protocol = connection->protocol; struct gb_interface *intf; int ret; - if (protocol->flags & GB_PROTOCOL_SKIP_SVC_CONNECTION) + if (gb_connection_is_static(connection)) return 0; intf = connection->bundle->intf; @@ -315,7 +314,7 @@ gb_connection_svc_connection_create(struct gb_connection *connection) static void gb_connection_svc_connection_destroy(struct gb_connection *connection) { - if (connection->protocol->flags & GB_PROTOCOL_SKIP_SVC_CONNECTION) + if (gb_connection_is_static(connection)) return; gb_svc_connection_destroy(connection->hd->svc, -- cgit v1.2.3