summaryrefslogtreecommitdiff
path: root/net/nfc/netlink.c
diff options
context:
space:
mode:
authorEric Lapuyade <eric.lapuyade@intel.com>2012-05-07 10:31:15 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2012-05-15 21:28:00 (GMT)
commitd4ccb132801aeeb2cfd18c4b4b7fa0043ab37f80 (patch)
tree7f3372d3925e5cb69cb5db5867accee4d17ff9b8 /net/nfc/netlink.c
parentaddfabf98daad7b469ad788a622dbeab6aaaa330 (diff)
downloadlinux-d4ccb132801aeeb2cfd18c4b4b7fa0043ab37f80.tar.xz
NFC: Specify usage for targets found and target lost events
It is now specified that nfc_target_found() and nfc_target_lost() core functions must not be called from an atomic context. This allow us to serialize calls and protect the targets table using the nfc device lock instead of a spinlock. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/netlink.c')
-rw-r--r--net/nfc/netlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index f1829f6..77dae74 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -128,7 +128,7 @@ static int nfc_genl_dump_targets(struct sk_buff *skb,
cb->args[1] = (long) dev;
}
- spin_lock_bh(&dev->targets_lock);
+ device_lock(&dev->dev);
cb->seq = dev->targets_generation;
@@ -141,7 +141,7 @@ static int nfc_genl_dump_targets(struct sk_buff *skb,
i++;
}
- spin_unlock_bh(&dev->targets_lock);
+ device_unlock(&dev->dev);
cb->args[0] = i;