aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorGravatar Johan Hovold <johan@hovoldconsulting.com> 2015-11-25 15:59:13 +0100
committerGravatar Greg Kroah-Hartman <gregkh@google.com> 2015-11-25 15:34:19 -0800
commit4ec1574ae99872a9d1922fb1e57b8d46df4d0920 (patch)
tree7cd1eea579e80bf90ed9bb743e630dfa7eeb0890 /drivers/staging/greybus/connection.c
parentgreybus: connection: fix potential null-deref on create (diff)
downloadlinux-4ec1574ae99872a9d1922fb1e57b8d46df4d0920.tar.gz
linux-4ec1574ae99872a9d1922fb1e57b8d46df4d0920.tar.bz2
linux-4ec1574ae99872a9d1922fb1e57b8d46df4d0920.zip
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 <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c5
1 files changed, 2 insertions, 3 deletions
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,