From: Christophe Ricard Date: Sat, 6 Jun 2015 11:16:45 +0000 (+0200) Subject: NFC: st21nfcb: Add ndlc_close in st21nfcb_nci_remove X-Git-Tag: v4.2-rc1~130^2~60^2~23 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6628b09f03dfbe2d3d234f1c6e5dff8752182be0;p=linux.git 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 Signed-off-by: Samuel Ortiz --- diff --git a/drivers/nfc/st21nfcb/st21nfcb.c b/drivers/nfc/st21nfcb/st21nfcb.c index c7dc282d5c3b..7a51bf056a69 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); }