Skip to content

Commit

Permalink
NFC: Export nfc_find_se()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arron Wang authored and Samuel Ortiz committed Sep 24, 2013
1 parent 5faba2f commit d8eb18e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/net/nfc/nfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
9 changes: 5 additions & 4 deletions net/nfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb,
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;

Expand All @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit d8eb18e

Please sign in to comment.