summaryrefslogtreecommitdiffstats
path: root/net/nfc/core.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-05-15 15:57:06 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-06-04 21:34:29 +0200
commitfe7c580073280c15bb4eb4f82bf20dddc1a68383 (patch)
tree0b71c488d1b3cdd87dd5e05ccd0224b496fec2f9 /net/nfc/core.c
parentab73b751303bc60d7d9fba875c958dedfe14754c (diff)
downloadlinux-fe7c580073280c15bb4eb4f82bf20dddc1a68383.tar.bz2
NFC: Add target mode protocols to the polling loop startup routine
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/core.c')
-rw-r--r--net/nfc/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index f5a43f701a9e..c83717bfcb8a 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -121,14 +121,14 @@ error:
* The device remains polling for targets until a target is found or
* the nfc_stop_poll function is called.
*/
-int nfc_start_poll(struct nfc_dev *dev, u32 protocols)
+int nfc_start_poll(struct nfc_dev *dev, u32 im_protocols, u32 tm_protocols)
{
int rc;
- pr_debug("dev_name=%s protocols=0x%x\n",
- dev_name(&dev->dev), protocols);
+ pr_debug("dev_name %s initiator protocols 0x%x target protocols 0x%x\n",
+ dev_name(&dev->dev), im_protocols, tm_protocols);
- if (!protocols)
+ if (!im_protocols && !tm_protocols)
return -EINVAL;
device_lock(&dev->dev);
@@ -143,7 +143,7 @@ int nfc_start_poll(struct nfc_dev *dev, u32 protocols)
goto error;
}
- rc = dev->ops->start_poll(dev, protocols);
+ rc = dev->ops->start_poll(dev, im_protocols, tm_protocols);
if (!rc)
dev->polling = true;