diff options
author | Johan Hovold | 2015-11-25 15:59:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-11-26 00:34:19 +0100 |
commit | 4ec1574ae99872a9d1922fb1e57b8d46df4d0920 (patch) | |
tree | 7cd1eea579e80bf90ed9bb743e630dfa7eeb0890 /drivers/staging/greybus/connection.h | |
parent | greybus: connection: fix potential null-deref on create (diff) | |
download | kernel-qcow2-linux-4ec1574ae99872a9d1922fb1e57b8d46df4d0920.tar.gz kernel-qcow2-linux-4ec1574ae99872a9d1922fb1e57b8d46df4d0920.tar.xz kernel-qcow2-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.h')
-rw-r--r-- | drivers/staging/greybus/connection.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h index c5499fcbfd13..446ffe157a12 100644 --- a/drivers/staging/greybus/connection.h +++ b/drivers/staging/greybus/connection.h @@ -60,6 +60,11 @@ struct gb_connection *gb_connection_create_dynamic(struct gb_interface *intf, u8 protocol_id); void gb_connection_destroy(struct gb_connection *connection); +static inline bool gb_connection_is_static(struct gb_connection *connection) +{ + return !connection->intf; +} + void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id, u8 *data, size_t length); |