summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2015-10-02 23:02:28 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2015-10-02 23:18:55 -0400
commit21d19f87d483fbac66ca24863b8c8d52a7ab539d (patch)
treee4b80a23f7a77eb325d01283cdf9cebd485ec760 /net/nfc
parentf6d3125fa3c2f55ddf7cf69365c41089de6cfae6 (diff)
NFC: nci: Use __nci_request for exported routines
Since we do not know in which context drivers will call these routines, they should use the unlocked version of nci_request, i.e. __nci_request. It is up to drivers to know/decide if they need to take the req_lock mutex before calling those routines. When being called from the NCI setup routine there is no need to do so as ops->setup is called under req_lock. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/nci/core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 943889b87a34..090972033a15 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -540,7 +540,7 @@ static void nci_nfcee_discover_req(struct nci_dev *ndev, unsigned long opt)
540 540
541int nci_nfcee_discover(struct nci_dev *ndev, u8 action) 541int nci_nfcee_discover(struct nci_dev *ndev, u8 action)
542{ 542{
543 return nci_request(ndev, nci_nfcee_discover_req, action, 543 return __nci_request(ndev, nci_nfcee_discover_req, action,
544 msecs_to_jiffies(NCI_CMD_TIMEOUT)); 544 msecs_to_jiffies(NCI_CMD_TIMEOUT));
545} 545}
546EXPORT_SYMBOL(nci_nfcee_discover); 546EXPORT_SYMBOL(nci_nfcee_discover);
@@ -561,8 +561,9 @@ int nci_nfcee_mode_set(struct nci_dev *ndev, u8 nfcee_id, u8 nfcee_mode)
561 cmd.nfcee_id = nfcee_id; 561 cmd.nfcee_id = nfcee_id;
562 cmd.nfcee_mode = nfcee_mode; 562 cmd.nfcee_mode = nfcee_mode;
563 563
564 return nci_request(ndev, nci_nfcee_mode_set_req, (unsigned long)&cmd, 564 return __nci_request(ndev, nci_nfcee_mode_set_req,
565 msecs_to_jiffies(NCI_CMD_TIMEOUT)); 565 (unsigned long)&cmd,
566 msecs_to_jiffies(NCI_CMD_TIMEOUT));
566} 567}
567EXPORT_SYMBOL(nci_nfcee_mode_set); 568EXPORT_SYMBOL(nci_nfcee_mode_set);
568 569
@@ -612,8 +613,8 @@ static void nci_core_conn_close_req(struct nci_dev *ndev, unsigned long opt)
612 613
613int nci_core_conn_close(struct nci_dev *ndev, u8 conn_id) 614int nci_core_conn_close(struct nci_dev *ndev, u8 conn_id)
614{ 615{
615 return nci_request(ndev, nci_core_conn_close_req, conn_id, 616 return __nci_request(ndev, nci_core_conn_close_req, conn_id,
616 msecs_to_jiffies(NCI_CMD_TIMEOUT)); 617 msecs_to_jiffies(NCI_CMD_TIMEOUT));
617} 618}
618EXPORT_SYMBOL(nci_core_conn_close); 619EXPORT_SYMBOL(nci_core_conn_close);
619 620