From: Viresh Kumar Date: Tue, 21 Jul 2015 12:14:14 +0000 (+0530) Subject: greybus: connection: don't send connected/disconnected events for SVC connection X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1359 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e602df658888d0dc1d51ab907036c67b87ca9f3a;p=karo-tx-linux.git greybus: connection: don't send connected/disconnected events for SVC connection SVC is also a special protocol (like control) and AP doesn't need to send (dis)connected events for its cport. Lets skip them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index edee5fb4a4b4..9187a369bcbb 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -289,7 +289,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) { + if (cport_id != GB_CONTROL_CPORT_ID && cport_id != GB_SVC_CPORT_ID) { struct gb_control *control = connection->bundle->intf->control; ret = gb_control_connected_operation(control, cport_id); @@ -341,7 +341,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) { + if (cport_id != GB_CONTROL_CPORT_ID && cport_id != GB_SVC_CPORT_ID) { struct gb_control *control = connection->bundle->intf->control; int ret;