From: Johan Hovold <johan@hovoldconsulting.com>
Date: Sat, 21 Nov 2015 09:51:58 +0000 (+0100)
Subject: greybus: connection: fix cport-id range
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=39f36c8f9ff6203301a1d7feb7f51d2563abbd3a;p=linux.git

greybus: connection: fix cport-id range

Fix cport-id allocation that failed to include the highest port id in the
available cport-id range.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
---

diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 96dabf7640a4d..695f1481ba0fc 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -219,7 +219,7 @@ struct gb_connection *gb_connection_create(struct gb_bundle *bundle,
 {
 	return gb_connection_create_range(bundle->intf->hd, bundle,
 					  &bundle->dev, cport_id, protocol_id,
-					  0, bundle->intf->hd->num_cports - 1);
+					  0, bundle->intf->hd->num_cports);
 }
 
 /*