From 48ed3f6e4202c9ddadac057108c273b8be85a78d Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 30 Jul 2015 22:13:27 +0530 Subject: [PATCH] greybus: connection: remove special check for svc cport id This is required to get things working for now, after the latest revert of svc protocol is done. Currently svc's cport id is set to 2 and that hd cport id will be used for the third connection we make. And that protocol (which is i2c in one of the cases), may not work as the (dis)connected event isn't sent for it. Fix this by getting rid of svc protocol check from (dis)connected events for now. This must be reverted later, once svc protocol is included again. Signed-off-by: Viresh Kumar Tested-by: Mark Greer Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/connection.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index b32da8a..3b553e6 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -344,8 +344,7 @@ int gb_connection_init(struct gb_connection *connection) * Inform Interface about Active CPorts. We don't need to do this * operation for control cport. */ - if (cport_id != GB_CONTROL_CPORT_ID && - connection->hd_cport_id != GB_SVC_CPORT_ID) { + if (cport_id != GB_CONTROL_CPORT_ID) { struct gb_control *control = connection->bundle->intf->control; ret = gb_control_connected_operation(control, cport_id); @@ -397,8 +396,7 @@ void gb_connection_exit(struct gb_connection *connection) * Inform Interface about In-active CPorts. We don't need to do this * operation for control cport. */ - if (cport_id != GB_CONTROL_CPORT_ID && - connection->hd_cport_id != GB_SVC_CPORT_ID) { + if (cport_id != GB_CONTROL_CPORT_ID) { struct gb_control *control = connection->bundle->intf->control; int ret; -- 2.7.4