Skip to content

Commit

Permalink
NFC: Update secure element state
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
arronwy authored and Samuel Ortiz committed Aug 13, 2013
1 parent 2c38328 commit 39525ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/nfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ int nfc_enable_se(struct nfc_dev *dev, u32 se_idx)
}

rc = dev->ops->enable_se(dev, se_idx);
if (rc >= 0)
se->state = NFC_SE_ENABLED;

error:
device_unlock(&dev->dev);
Expand Down Expand Up @@ -632,6 +634,8 @@ int nfc_disable_se(struct nfc_dev *dev, u32 se_idx)
}

rc = dev->ops->disable_se(dev, se_idx);
if (rc >= 0)
se->state = NFC_SE_DISABLED;

error:
device_unlock(&dev->dev);
Expand Down

0 comments on commit 39525ee

Please sign in to comment.