summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.h
diff options
context:
space:
mode:
authorJohan Hovold2016-01-21 17:34:21 +0100
committerGreg Kroah-Hartman2016-01-22 07:46:38 +0100
commitf7ee081e3151e187e7478eb8941f61744f125201 (patch)
tree7cc0f73f1a5b6f78033029f43e406762ba1a9d66 /drivers/staging/greybus/connection.h
parentgreybus: legacy: look up protocol at connection creation (diff)
downloadkernel-qcow2-linux-f7ee081e3151e187e7478eb8941f61744f125201.tar.gz
kernel-qcow2-linux-f7ee081e3151e187e7478eb8941f61744f125201.tar.xz
kernel-qcow2-linux-f7ee081e3151e187e7478eb8941f61744f125201.zip
greybus: connection: set request handlers at creation
Set the connection request handler at creation rather than when enabling the connection. This is possible now that connections are created by the drivers that use them rather than by core at manifest parsing time. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> 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.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h
index 8e5284abb377..24b7d6f47671 100644
--- a/drivers/staging/greybus/connection.h
+++ b/drivers/staging/greybus/connection.h
@@ -55,10 +55,10 @@ struct gb_connection {
};
struct gb_connection *gb_connection_create_static(struct gb_host_device *hd,
- u16 hd_cport_id);
+ u16 hd_cport_id, gb_request_handler_t handler);
struct gb_connection *gb_connection_create_control(struct gb_interface *intf);
struct gb_connection *gb_connection_create(struct gb_bundle *bundle,
- u16 cport_id);
+ u16 cport_id, gb_request_handler_t handler);
void gb_connection_destroy(struct gb_connection *connection);
static inline bool gb_connection_is_static(struct gb_connection *connection)
@@ -66,12 +66,8 @@ static inline bool gb_connection_is_static(struct gb_connection *connection)
return !connection->intf;
}
-int gb_connection_enable(struct gb_connection *connection,
- gb_request_handler_t handler);
-static inline int gb_connection_enable_tx(struct gb_connection *connection)
-{
- return gb_connection_enable(connection, NULL);
-}
+int gb_connection_enable(struct gb_connection *connection);
+int gb_connection_enable_tx(struct gb_connection *connection);
void gb_connection_disable_rx(struct gb_connection *connection);
void gb_connection_disable(struct gb_connection *connection);