NFC: llcp: Use list_for_each_entry in nfc_llcp_find_local()

nfc_llcp_find_local() does not modify any list entry while iterating the list.
So use list_for_each_entry instead of list_for_each_entry_safe.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Axel Lin 2014-02-26 10:26:45 +08:00 committed by Samuel Ortiz
parent 3143a4ca61
commit 29e27dd86b

View File

@ -293,9 +293,9 @@ static void nfc_llcp_sdreq_timer(unsigned long data)
struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev)
{
struct nfc_llcp_local *local, *n;
struct nfc_llcp_local *local;
list_for_each_entry_safe(local, n, &llcp_devices, list)
list_for_each_entry(local, &llcp_devices, list)
if (local->dev == dev)
return local;