]> Pileus Git - ~andy/linux/commitdiff
NFC: Export nfc_find_se()
authorArron Wang <arron.wang@intel.com>
Fri, 23 Aug 2013 08:02:08 +0000 (16:02 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 24 Sep 2013 23:35:39 +0000 (01:35 +0200)
This will be needed by all NFC driver implementing the SE ops.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
include/net/nfc/nfc.h
net/nfc/core.c

index f68ee68e4e3e97cd055bc8cc760ab6bba9a11a4b..e34859423105876b4d1e1a5c31ab74497d28aed2 100644 (file)
@@ -243,5 +243,6 @@ void nfc_driver_failure(struct nfc_dev *dev, int err);
 
 int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type);
 int nfc_remove_se(struct nfc_dev *dev, u32 se_idx);
+struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx);
 
 #endif /* __NET_NFC_H */
index e92923cf3e0374f950417e5039ba2e61369c8e27..269ffc5288d02fcf894e0cac249ec5073bf2f785 100644 (file)
@@ -536,7 +536,7 @@ error:
        return rc;
 }
 
-static struct nfc_se *find_se(struct nfc_dev *dev, u32 se_idx)
+struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx)
 {
        struct nfc_se *se, *n;
 
@@ -546,6 +546,7 @@ static struct nfc_se *find_se(struct nfc_dev *dev, u32 se_idx)
 
        return NULL;
 }
+EXPORT_SYMBOL(nfc_find_se);
 
 int nfc_enable_se(struct nfc_dev *dev, u32 se_idx)
 {
@@ -577,7 +578,7 @@ int nfc_enable_se(struct nfc_dev *dev, u32 se_idx)
                goto error;
        }
 
-       se = find_se(dev, se_idx);
+       se = nfc_find_se(dev, se_idx);
        if (!se) {
                rc = -EINVAL;
                goto error;
@@ -622,7 +623,7 @@ int nfc_disable_se(struct nfc_dev *dev, u32 se_idx)
                goto error;
        }
 
-       se = find_se(dev, se_idx);
+       se = nfc_find_se(dev, se_idx);
        if (!se) {
                rc = -EINVAL;
                goto error;
@@ -881,7 +882,7 @@ int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type)
 
        pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx);
 
-       se = find_se(dev, se_idx);
+       se = nfc_find_se(dev, se_idx);
        if (se)
                return -EALREADY;