]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
NFC: st21nfcb: Add ndlc_close in st21nfcb_nci_remove
authorChristophe Ricard <christophe.ricard@gmail.com>
Sat, 6 Jun 2015 11:16:45 +0000 (13:16 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Jun 2015 22:34:23 +0000 (00:34 +0200)
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>
drivers/nfc/st21nfcb/st21nfcb.c

index c7dc282d5c3be3e6ef625d0a9a306aa742040de1..7a51bf056a6993f52a02b6884edcf9d2c645a221 100644 (file)
@@ -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);
 }