NFC: st21nfcb: Move st21nfcb_nci_remove in ndlc_remove
authorChristophe Ricard <christophe.ricard@gmail.com>
Sat, 6 Jun 2015 11:16:49 +0000 (13:16 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Jun 2015 22:34:25 +0000 (00:34 +0200)
Removing st21nfcb may need to execute some specific commands before
stopping the ndlc state machine.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/st21nfcb/ndlc.c

index 6014b585946595dc9afa1f51b5f24553d2a52e16..429cf055d532b4c43f4094ee33154a7b441f295a 100644 (file)
@@ -286,6 +286,8 @@ EXPORT_SYMBOL(ndlc_probe);
 
 void ndlc_remove(struct llt_ndlc *ndlc)
 {
+       st21nfcb_nci_remove(ndlc->ndev);
+
        /* cancel timers */
        del_timer_sync(&ndlc->t1_timer);
        del_timer_sync(&ndlc->t2_timer);
@@ -294,7 +296,5 @@ void ndlc_remove(struct llt_ndlc *ndlc)
 
        skb_queue_purge(&ndlc->rcv_q);
        skb_queue_purge(&ndlc->send_q);
-
-       st21nfcb_nci_remove(ndlc->ndev);
 }
 EXPORT_SYMBOL(ndlc_remove);