[RFC v2 09/17] nfc: st21nfcb: Add ndlc_close in st21nfcb_nci_remove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




In order to release the st21nfcb properly close the ndlc layer first.

Signed-off-by: Christophe Ricard <christophe-h.ricard@xxxxxx>
---
 drivers/nfc/st21nfcb/st21nfcb.c | 4 ++++
 1 file changed, 4 insertions(+)

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);
 }
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux