diff options
author | Eric Lapuyade <eric.lapuyade@intel.com> | 2012-05-07 12:31:15 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-15 17:28:00 -0400 |
commit | d4ccb132801aeeb2cfd18c4b4b7fa0043ab37f80 (patch) | |
tree | 7f3372d3925e5cb69cb5db5867accee4d17ff9b8 /net/nfc/netlink.c | |
parent | addfabf98daad7b469ad788a622dbeab6aaaa330 (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index f1829f6ae9c5..77dae74832d3 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; |