Thread (22 messages) 22 messages, 4 authors, 2015-10-24
STALE3908d
Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 16/30] nfc: st-nci: Change st_nci_gates offset when looking for a pipe in the table

From: Christophe Ricard <hidden>
Date: 2015-10-20 21:48:55
Also in: stable
Subsystem: nfc subsystem, the rest · Maintainers: David Heidelberg, Linus Torvalds

It is useless to start from index 0 when looking for a gate because only
dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST).

The first dynamic pipe is present at index 3.

Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <redacted>
---
 drivers/nfc/st-nci/st-nci_se.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c
index 7b94387..a8ae04e 100644
--- a/drivers/nfc/st-nci/st-nci_se.c
+++ b/drivers/nfc/st-nci/st-nci_se.c
@@ -229,7 +229,7 @@ int st_nci_hci_load_session(struct nci_dev *ndev)
 			continue;
 		}
 
-		for (j = 0; (j < ARRAY_SIZE(st_nci_gates)) &&
+		for (j = 3; (j < ARRAY_SIZE(st_nci_gates)) &&
 		     (st_nci_gates[j].gate != dm_pipe_info->dst_gate_id); j++)
 			;
 
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help