summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-06-06 13:16:45 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2015-06-09 00:34:23 +0200
commit6628b09f03dfbe2d3d234f1c6e5dff8752182be0 (patch)
tree7f491e2dacf3ccf48499ffa4d6d0f4577a3808c6 /drivers/nfc
parent4ac82e894825126816d7b7f662743335ce2b015e (diff)
downloadop-kernel-dev-6628b09f03dfbe2d3d234f1c6e5dff8752182be0.zip
op-kernel-dev-6628b09f03dfbe2d3d234f1c6e5dff8752182be0.tar.gz
NFC: st21nfcb: Add ndlc_close in st21nfcb_nci_remove
In order to release the st21nfcb properly close the ndlc layer first. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfcb/st21nfcb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nfc/st21nfcb/st21nfcb.c b/drivers/nfc/st21nfcb/st21nfcb.c
index c7dc282..7a51bf0 100644
--- a/drivers/nfc/st21nfcb/st21nfcb.c
+++ b/drivers/nfc/st21nfcb/st21nfcb.c
@@ -131,6 +131,10 @@ EXPORT_SYMBOL_GPL(st21nfcb_nci_probe);
void st21nfcb_nci_remove(struct nci_dev *ndev)
{
+ struct st21nfcb_nci_info *info = nci_get_drvdata(ndev);
+
+ ndlc_close(info->ndlc);
+
nci_unregister_device(ndev);
nci_free_device(ndev);
}
OpenPOWER on IntegriCloud