greybus: connection: intf_cport_id is local to an interface
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 1 Jul 2015 06:43:56 +0000 (12:13 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jul 2015 23:38:42 +0000 (16:38 -0700)
commitc3a1617099cb57da038297cfc40abedb1fe7a287
tree06adc66848d8e1333de4f3189d8115d7dfc3f3af
parentb758d68618ffda2f6c1c1d40f90350429e9f7092
greybus: connection: intf_cport_id is local to an interface

intf_cport_id is local to an interface and same intf_cport_id can be
used for two separate interface blocks. For finding a connection for an
interface, we are matching intf_cport_id of the connection with
cport_id, passed as argument. This is wrong, as it can match for a
connection on a different interface block.

Fix it by also comparing interface block for which connection is
requested.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c