Commit 19072998 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Samuel Ortiz

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent fa9be5f0
...@@ -414,8 +414,6 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev) ...@@ -414,8 +414,6 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev)
{ {
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
struct nci_set_config_param param; struct nci_set_config_param param;
__u8 local_gb[NFC_MAX_GT_LEN];
int i;
param.val = nfc_get_local_general_bytes(nfc_dev, &param.len); param.val = nfc_get_local_general_bytes(nfc_dev, &param.len);
if ((param.val == NULL) || (param.len == 0)) if ((param.val == NULL) || (param.len == 0))
...@@ -424,11 +422,7 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev) ...@@ -424,11 +422,7 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev)
if (param.len > NFC_MAX_GT_LEN) if (param.len > NFC_MAX_GT_LEN)
return -EINVAL; return -EINVAL;
for (i = 0; i < param.len; i++)
local_gb[param.len-1-i] = param.val[i];
param.id = NCI_PN_ATR_REQ_GEN_BYTES; param.id = NCI_PN_ATR_REQ_GEN_BYTES;
param.val = local_gb;
return nci_request(ndev, nci_set_config_req, (unsigned long)&param, return nci_request(ndev, nci_set_config_req, (unsigned long)&param,
msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT)); msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment