@@ -540,7 +540,7 @@ static void nfc_shdlc_connect_timeout(unsigned long data)
540540
541541 pr_debug ("\n" );
542542
543- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
543+ queue_work (system_nrt_wq , & shdlc -> sm_work );
544544}
545545
546546static void nfc_shdlc_t1_timeout (unsigned long data )
@@ -549,7 +549,7 @@ static void nfc_shdlc_t1_timeout(unsigned long data)
549549
550550 pr_debug ("SoftIRQ: need to send ack\n" );
551551
552- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
552+ queue_work (system_nrt_wq , & shdlc -> sm_work );
553553}
554554
555555static void nfc_shdlc_t2_timeout (unsigned long data )
@@ -558,7 +558,7 @@ static void nfc_shdlc_t2_timeout(unsigned long data)
558558
559559 pr_debug ("SoftIRQ: need to retransmit\n" );
560560
561- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
561+ queue_work (system_nrt_wq , & shdlc -> sm_work );
562562}
563563
564564static void nfc_shdlc_sm_work (struct work_struct * work )
@@ -598,7 +598,7 @@ static void nfc_shdlc_sm_work(struct work_struct *work)
598598 case SHDLC_NEGOCIATING :
599599 if (timer_pending (& shdlc -> connect_timer ) == 0 ) {
600600 shdlc -> state = SHDLC_CONNECTING ;
601- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
601+ queue_work (system_nrt_wq , & shdlc -> sm_work );
602602 }
603603
604604 nfc_shdlc_handle_rcv_queue (shdlc );
@@ -662,7 +662,7 @@ static int nfc_shdlc_connect(struct nfc_shdlc *shdlc)
662662
663663 mutex_unlock (& shdlc -> state_mutex );
664664
665- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
665+ queue_work (system_nrt_wq , & shdlc -> sm_work );
666666
667667 wait_event (connect_wq , shdlc -> connect_result != 1 );
668668
@@ -679,7 +679,7 @@ static void nfc_shdlc_disconnect(struct nfc_shdlc *shdlc)
679679
680680 mutex_unlock (& shdlc -> state_mutex );
681681
682- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
682+ queue_work (system_nrt_wq , & shdlc -> sm_work );
683683}
684684
685685/*
@@ -697,7 +697,7 @@ void nfc_shdlc_recv_frame(struct nfc_shdlc *shdlc, struct sk_buff *skb)
697697 skb_queue_tail (& shdlc -> rcv_q , skb );
698698 }
699699
700- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
700+ queue_work (system_nrt_wq , & shdlc -> sm_work );
701701}
702702EXPORT_SYMBOL (nfc_shdlc_recv_frame );
703703
@@ -754,7 +754,7 @@ static int nfc_shdlc_xmit(struct nfc_hci_dev *hdev, struct sk_buff *skb)
754754
755755 skb_queue_tail (& shdlc -> send_q , skb );
756756
757- queue_work (shdlc -> sm_wq , & shdlc -> sm_work );
757+ queue_work (system_nrt_wq , & shdlc -> sm_work );
758758
759759 return 0 ;
760760}
@@ -843,7 +843,6 @@ struct nfc_shdlc *nfc_shdlc_allocate(struct nfc_shdlc_ops *ops,
843843{
844844 struct nfc_shdlc * shdlc ;
845845 int r ;
846- char name [32 ];
847846
848847 if (ops -> xmit == NULL )
849848 return NULL ;
@@ -876,11 +875,6 @@ struct nfc_shdlc *nfc_shdlc_allocate(struct nfc_shdlc_ops *ops,
876875 skb_queue_head_init (& shdlc -> ack_pending_q );
877876
878877 INIT_WORK (& shdlc -> sm_work , nfc_shdlc_sm_work );
879- snprintf (name , sizeof (name ), "%s_shdlc_sm_wq" , devname );
880- shdlc -> sm_wq = alloc_workqueue (name , WQ_NON_REENTRANT | WQ_UNBOUND |
881- WQ_MEM_RECLAIM , 1 );
882- if (shdlc -> sm_wq == NULL )
883- goto err_allocwq ;
884878
885879 shdlc -> client_headroom = tx_headroom ;
886880 shdlc -> client_tailroom = tx_tailroom ;
@@ -904,9 +898,6 @@ struct nfc_shdlc *nfc_shdlc_allocate(struct nfc_shdlc_ops *ops,
904898 nfc_hci_free_device (shdlc -> hdev );
905899
906900err_allocdev :
907- destroy_workqueue (shdlc -> sm_wq );
908-
909- err_allocwq :
910901 kfree (shdlc );
911902
912903 return NULL ;
@@ -920,7 +911,7 @@ void nfc_shdlc_free(struct nfc_shdlc *shdlc)
920911 nfc_hci_unregister_device (shdlc -> hdev );
921912 nfc_hci_free_device (shdlc -> hdev );
922913
923- destroy_workqueue ( shdlc -> sm_wq );
914+ cancel_work_sync ( & shdlc -> sm_work );
924915
925916 skb_queue_purge (& shdlc -> rcv_q );
926917 skb_queue_purge (& shdlc -> send_q );
0 commit comments