diff options
author | 2015-11-25 15:59:13 +0100 | |
---|---|---|
committer | 2015-11-25 15:34:19 -0800 | |
commit | 4ec1574ae99872a9d1922fb1e57b8d46df4d0920 (patch) | |
tree | 7cd1eea579e80bf90ed9bb743e630dfa7eeb0890 /drivers/staging/greybus/connection.c | |
parent | greybus: connection: fix potential null-deref on create (diff) | |
download | linux-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.c | 5 |
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, |