aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/core.c
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2013-07-30 08:40:05 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-08-13 19:13:40 -0400
commit39525ee1dc78ca1f5f2fb1f764f7a141005fe440 (patch)
tree4b2c5948e3d0699f30921e6144361b405c5df68c /net/nfc/core.c
parent2c3832834b95e0226da1d13229472978f78462c5 (diff)
NFC: Update secure element state
The secure element state was not updated from the enable/disable ops, leaving the SE state to disabled for ever. Signed-off-by: Arron Wang <arron.wang@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/core.c')
-rw-r--r--net/nfc/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index ee1fe66e2c8a..e92923cf3e03 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -589,6 +589,8 @@ int nfc_enable_se(struct nfc_dev *dev, u32 se_idx)
589 } 589 }
590 590
591 rc = dev->ops->enable_se(dev, se_idx); 591 rc = dev->ops->enable_se(dev, se_idx);
592 if (rc >= 0)
593 se->state = NFC_SE_ENABLED;
592 594
593error: 595error:
594 device_unlock(&dev->dev); 596 device_unlock(&dev->dev);
@@ -632,6 +634,8 @@ int nfc_disable_se(struct nfc_dev *dev, u32 se_idx)
632 } 634 }
633 635
634 rc = dev->ops->disable_se(dev, se_idx); 636 rc = dev->ops->disable_se(dev, se_idx);
637 if (rc >= 0)
638 se->state = NFC_SE_DISABLED;
635 639
636error: 640error:
637 device_unlock(&dev->dev); 641 device_unlock(&dev->dev);