From: Arron Wang Date: Tue, 30 Jul 2013 12:40:05 +0000 (+0200) Subject: NFC: Update secure element state X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=39525ee1dc78ca1f5f2fb1f764f7a141005fe440;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Samuel Ortiz --- 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) } rc = dev->ops->enable_se(dev, se_idx); + if (rc >= 0) + se->state = NFC_SE_ENABLED; error: device_unlock(&dev->dev); @@ -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);