diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-05-30 13:41:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-30 13:41:40 -0400 |
commit | 57afc62e9422954329adecdb8251cc232e9fe308 (patch) | |
tree | d2f3410ff4d193e28b67c31efbcd6b341520f38f /net | |
parent | a3b9d55350d6e54f4b4ed80eeda7a1b8f27c1db9 (diff) | |
parent | 6857bb96271cd40ffb38825d43897d716310e3db (diff) | |
download | linux-57afc62e9422954329adecdb8251cc232e9fe308.tar.gz linux-57afc62e9422954329adecdb8251cc232e9fe308.tar.bz2 linux-57afc62e9422954329adecdb8251cc232e9fe308.zip |
Merge tag 'nfc-next-3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next
Samuel Ortiz <sameo@linux.intel.com> says:
"NFC: 3.16: Second pull request
This is the 2nd NFC pull request for 3.16. We have:
- Felica (Type3) tags support for trf7970a
- Type 4b tags support for port100
- st21nfca DTS typo fix
- A few sparse warning check fixes"
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/nfc/digital_core.c | 6 | ||||
-rw-r--r-- | net/nfc/digital_dep.c | 5 | ||||
-rw-r--r-- | net/nfc/digital_technology.c | 2 | ||||
-rw-r--r-- | net/nfc/rawsock.c | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c index b105cfb00e76..a6ce3c627e4e 100644 --- a/net/nfc/digital_core.c +++ b/net/nfc/digital_core.c @@ -386,6 +386,8 @@ int digital_target_found(struct nfc_digital_dev *ddev, void digital_poll_next_tech(struct nfc_digital_dev *ddev) { + u8 rand_mod; + digital_switch_rf(ddev, 0); mutex_lock(&ddev->poll_lock); @@ -395,8 +397,8 @@ void digital_poll_next_tech(struct nfc_digital_dev *ddev) return; } - ddev->poll_tech_index = (ddev->poll_tech_index + 1) % - ddev->poll_tech_count; + get_random_bytes(&rand_mod, sizeof(rand_mod)); + ddev->poll_tech_index = rand_mod % ddev->poll_tech_count; mutex_unlock(&ddev->poll_lock); diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c index d4ed25ff723f..171cb9949ab5 100644 --- a/net/nfc/digital_dep.c +++ b/net/nfc/digital_dep.c @@ -224,9 +224,8 @@ int digital_in_send_atr_req(struct nfc_digital_dev *ddev, ddev->skb_add_crc(skb); - digital_in_send_cmd(ddev, skb, 500, digital_in_recv_atr_res, target); - - return 0; + return digital_in_send_cmd(ddev, skb, 500, digital_in_recv_atr_res, + target); } static int digital_in_send_rtox(struct nfc_digital_dev *ddev, diff --git a/net/nfc/digital_technology.c b/net/nfc/digital_technology.c index 12a233e9ece5..c2c1c0189b7c 100644 --- a/net/nfc/digital_technology.c +++ b/net/nfc/digital_technology.c @@ -613,7 +613,7 @@ exit: digital_poll_next_tech(ddev); } -int digital_in_send_attrib_req(struct nfc_digital_dev *ddev, +static int digital_in_send_attrib_req(struct nfc_digital_dev *ddev, struct nfc_target *target, struct digital_sensb_res *sensb_res) { diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index 8627c75063e2..55eefee311eb 100644 --- a/net/nfc/rawsock.c +++ b/net/nfc/rawsock.c @@ -31,14 +31,14 @@ static struct nfc_sock_list raw_sk_list = { .lock = __RW_LOCK_UNLOCKED(raw_sk_list.lock) }; -void nfc_sock_link(struct nfc_sock_list *l, struct sock *sk) +static void nfc_sock_link(struct nfc_sock_list *l, struct sock *sk) { write_lock(&l->lock); sk_add_node(sk, &l->head); write_unlock(&l->lock); } -void nfc_sock_unlink(struct nfc_sock_list *l, struct sock *sk) +static void nfc_sock_unlink(struct nfc_sock_list *l, struct sock *sk) { write_lock(&l->lock); sk_del_node_init(sk); |