diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-01-06 15:58:15 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-01-06 19:32:40 -0500 |
commit | 1907299867431fd899ae630a29b08b878ca1e50f (patch) | |
tree | 8fa6e5029535c18834a393a23b1a3855e6507b78 /net/nfc | |
parent | fa9be5f009e8cfc695a2cd71617fc620ab5c1c18 (diff) |
NFC: NCI: Don't reverse local general bytes
Local general bytes returned by nfc_get_local_general_bytes()
are already in correct order. We don't need to reverse them.
Remove local_gb[] local array as it's not needed any more.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/nci/core.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 0a2ee83c3bd3..6fbb7bab46e7 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -414,8 +414,6 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev) | |||
414 | { | 414 | { |
415 | struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); | 415 | struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); |
416 | struct nci_set_config_param param; | 416 | struct nci_set_config_param param; |
417 | __u8 local_gb[NFC_MAX_GT_LEN]; | ||
418 | int i; | ||
419 | 417 | ||
420 | param.val = nfc_get_local_general_bytes(nfc_dev, ¶m.len); | 418 | param.val = nfc_get_local_general_bytes(nfc_dev, ¶m.len); |
421 | if ((param.val == NULL) || (param.len == 0)) | 419 | if ((param.val == NULL) || (param.len == 0)) |
@@ -424,11 +422,7 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev) | |||
424 | if (param.len > NFC_MAX_GT_LEN) | 422 | if (param.len > NFC_MAX_GT_LEN) |
425 | return -EINVAL; | 423 | return -EINVAL; |
426 | 424 | ||
427 | for (i = 0; i < param.len; i++) | ||
428 | local_gb[param.len-1-i] = param.val[i]; | ||
429 | |||
430 | param.id = NCI_PN_ATR_REQ_GEN_BYTES; | 425 | param.id = NCI_PN_ATR_REQ_GEN_BYTES; |
431 | param.val = local_gb; | ||
432 | 426 | ||
433 | return nci_request(ndev, nci_set_config_req, (unsigned long)¶m, | 427 | return nci_request(ndev, nci_set_config_req, (unsigned long)¶m, |
434 | msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT)); | 428 | msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT)); |