aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 19:01:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 19:01:31 -0400
commit916082b073ebb7f4e064cebce0768e34cacde508 (patch)
tree8a8037ebbaaffb2336ac4526a7f87ac9a22aeafd /net/nfc
parentaecdc33e111b2c447b622e287c6003726daa1426 (diff)
workqueue: avoid using deprecated functions
The network merge brought in a few users of functions that got deprecated by the workqueue cleanups: the 'system_nrt_wq' is now the same as the regular system_wq, since all workqueues are now non- reentrant. Similarly, remove one use of flush_work_sync() - the regular flush_work() has become synchronous, and the "_sync()" version is thus deprecated as being superfluous. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/core.c2
-rw-r--r--net/nfc/hci/core.c6
-rw-r--r--net/nfc/hci/hcp.c2
-rw-r--r--net/nfc/hci/llc_shdlc.c16
-rw-r--r--net/nfc/llcp/llcp.c10
5 files changed, 18 insertions, 18 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index c9eacc1f145f..479bee36dc3e 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -715,7 +715,7 @@ static void nfc_check_pres_timeout(unsigned long data)
715{ 715{
716 struct nfc_dev *dev = (struct nfc_dev *)data; 716 struct nfc_dev *dev = (struct nfc_dev *)data;
717 717
718 queue_work(system_nrt_wq, &dev->check_pres_work); 718 schedule_work(&dev->check_pres_work);
719} 719}
720 720
721struct class nfc_class = { 721struct class nfc_class = {
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index d378d93de62e..5fbb6e40793e 100644
--- a/net/nfc/hci/core.c
+++ b/net/nfc/hci/core.c
@@ -141,7 +141,7 @@ static void __nfc_hci_cmd_completion(struct nfc_hci_dev *hdev, int err,
141 kfree(hdev->cmd_pending_msg); 141 kfree(hdev->cmd_pending_msg);
142 hdev->cmd_pending_msg = NULL; 142 hdev->cmd_pending_msg = NULL;
143 143
144 queue_work(system_nrt_wq, &hdev->msg_tx_work); 144 schedule_work(&hdev->msg_tx_work);
145} 145}
146 146
147void nfc_hci_resp_received(struct nfc_hci_dev *hdev, u8 result, 147void nfc_hci_resp_received(struct nfc_hci_dev *hdev, u8 result,
@@ -326,7 +326,7 @@ static void nfc_hci_cmd_timeout(unsigned long data)
326{ 326{
327 struct nfc_hci_dev *hdev = (struct nfc_hci_dev *)data; 327 struct nfc_hci_dev *hdev = (struct nfc_hci_dev *)data;
328 328
329 queue_work(system_nrt_wq, &hdev->msg_tx_work); 329 schedule_work(&hdev->msg_tx_work);
330} 330}
331 331
332static int hci_dev_connect_gates(struct nfc_hci_dev *hdev, u8 gate_count, 332static int hci_dev_connect_gates(struct nfc_hci_dev *hdev, u8 gate_count,
@@ -714,7 +714,7 @@ static void nfc_hci_recv_from_llc(struct nfc_hci_dev *hdev, struct sk_buff *skb)
714 nfc_hci_hcp_message_rx(hdev, pipe, type, instruction, hcp_skb); 714 nfc_hci_hcp_message_rx(hdev, pipe, type, instruction, hcp_skb);
715 } else { 715 } else {
716 skb_queue_tail(&hdev->msg_rx_queue, hcp_skb); 716 skb_queue_tail(&hdev->msg_rx_queue, hcp_skb);
717 queue_work(system_nrt_wq, &hdev->msg_rx_work); 717 schedule_work(&hdev->msg_rx_work);
718 } 718 }
719} 719}
720 720
diff --git a/net/nfc/hci/hcp.c b/net/nfc/hci/hcp.c
index 208eedd07ee3..bc308a7ca609 100644
--- a/net/nfc/hci/hcp.c
+++ b/net/nfc/hci/hcp.c
@@ -108,7 +108,7 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe,
108 list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue); 108 list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue);
109 mutex_unlock(&hdev->msg_tx_mutex); 109 mutex_unlock(&hdev->msg_tx_mutex);
110 110
111 queue_work(system_nrt_wq, &hdev->msg_tx_work); 111 schedule_work(&hdev->msg_tx_work);
112 112
113 return 0; 113 return 0;
114 114
diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c
index 8f69d791dcb3..01cbc72943cd 100644
--- a/net/nfc/hci/llc_shdlc.c
+++ b/net/nfc/hci/llc_shdlc.c
@@ -588,7 +588,7 @@ static void llc_shdlc_connect_timeout(unsigned long data)
588 588
589 pr_debug("\n"); 589 pr_debug("\n");
590 590
591 queue_work(system_nrt_wq, &shdlc->sm_work); 591 schedule_work(&shdlc->sm_work);
592} 592}
593 593
594static void llc_shdlc_t1_timeout(unsigned long data) 594static void llc_shdlc_t1_timeout(unsigned long data)
@@ -597,7 +597,7 @@ static void llc_shdlc_t1_timeout(unsigned long data)
597 597
598 pr_debug("SoftIRQ: need to send ack\n"); 598 pr_debug("SoftIRQ: need to send ack\n");
599 599
600 queue_work(system_nrt_wq, &shdlc->sm_work); 600 schedule_work(&shdlc->sm_work);
601} 601}
602 602
603static void llc_shdlc_t2_timeout(unsigned long data) 603static void llc_shdlc_t2_timeout(unsigned long data)
@@ -606,7 +606,7 @@ static void llc_shdlc_t2_timeout(unsigned long data)
606 606
607 pr_debug("SoftIRQ: need to retransmit\n"); 607 pr_debug("SoftIRQ: need to retransmit\n");
608 608
609 queue_work(system_nrt_wq, &shdlc->sm_work); 609 schedule_work(&shdlc->sm_work);
610} 610}
611 611
612static void llc_shdlc_sm_work(struct work_struct *work) 612static void llc_shdlc_sm_work(struct work_struct *work)
@@ -646,7 +646,7 @@ static void llc_shdlc_sm_work(struct work_struct *work)
646 case SHDLC_NEGOTIATING: 646 case SHDLC_NEGOTIATING:
647 if (timer_pending(&shdlc->connect_timer) == 0) { 647 if (timer_pending(&shdlc->connect_timer) == 0) {
648 shdlc->state = SHDLC_CONNECTING; 648 shdlc->state = SHDLC_CONNECTING;
649 queue_work(system_nrt_wq, &shdlc->sm_work); 649 schedule_work(&shdlc->sm_work);
650 } 650 }
651 651
652 llc_shdlc_handle_rcv_queue(shdlc); 652 llc_shdlc_handle_rcv_queue(shdlc);
@@ -711,7 +711,7 @@ static int llc_shdlc_connect(struct llc_shdlc *shdlc)
711 711
712 mutex_unlock(&shdlc->state_mutex); 712 mutex_unlock(&shdlc->state_mutex);
713 713
714 queue_work(system_nrt_wq, &shdlc->sm_work); 714 schedule_work(&shdlc->sm_work);
715 715
716 wait_event(connect_wq, shdlc->connect_result != 1); 716 wait_event(connect_wq, shdlc->connect_result != 1);
717 717
@@ -728,7 +728,7 @@ static void llc_shdlc_disconnect(struct llc_shdlc *shdlc)
728 728
729 mutex_unlock(&shdlc->state_mutex); 729 mutex_unlock(&shdlc->state_mutex);
730 730
731 queue_work(system_nrt_wq, &shdlc->sm_work); 731 schedule_work(&shdlc->sm_work);
732} 732}
733 733
734/* 734/*
@@ -746,7 +746,7 @@ static void llc_shdlc_recv_frame(struct llc_shdlc *shdlc, struct sk_buff *skb)
746 skb_queue_tail(&shdlc->rcv_q, skb); 746 skb_queue_tail(&shdlc->rcv_q, skb);
747 } 747 }
748 748
749 queue_work(system_nrt_wq, &shdlc->sm_work); 749 schedule_work(&shdlc->sm_work);
750} 750}
751 751
752static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, 752static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv,
@@ -837,7 +837,7 @@ static int llc_shdlc_xmit_from_hci(struct nfc_llc *llc, struct sk_buff *skb)
837 837
838 skb_queue_tail(&shdlc->send_q, skb); 838 skb_queue_tail(&shdlc->send_q, skb);
839 839
840 queue_work(system_nrt_wq, &shdlc->sm_work); 840 schedule_work(&shdlc->sm_work);
841 841
842 return 0; 842 return 0;
843} 843}
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index c12c5ef3d036..cc10d073c338 100644
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -181,7 +181,7 @@ static void nfc_llcp_symm_timer(unsigned long data)
181 181
182 pr_err("SYMM timeout\n"); 182 pr_err("SYMM timeout\n");
183 183
184 queue_work(system_nrt_wq, &local->timeout_work); 184 schedule_work(&local->timeout_work);
185} 185}
186 186
187struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev) 187struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev)
@@ -1101,7 +1101,7 @@ static void nfc_llcp_rx_work(struct work_struct *work)
1101 1101
1102 } 1102 }
1103 1103
1104 queue_work(system_nrt_wq, &local->tx_work); 1104 schedule_work(&local->tx_work);
1105 kfree_skb(local->rx_pending); 1105 kfree_skb(local->rx_pending);
1106 local->rx_pending = NULL; 1106 local->rx_pending = NULL;
1107 1107
@@ -1120,7 +1120,7 @@ void nfc_llcp_recv(void *data, struct sk_buff *skb, int err)
1120 1120
1121 local->rx_pending = skb_get(skb); 1121 local->rx_pending = skb_get(skb);
1122 del_timer(&local->link_timer); 1122 del_timer(&local->link_timer);
1123 queue_work(system_nrt_wq, &local->rx_work); 1123 schedule_work(&local->rx_work);
1124 1124
1125 return; 1125 return;
1126} 1126}
@@ -1135,7 +1135,7 @@ int nfc_llcp_data_received(struct nfc_dev *dev, struct sk_buff *skb)
1135 1135
1136 local->rx_pending = skb_get(skb); 1136 local->rx_pending = skb_get(skb);
1137 del_timer(&local->link_timer); 1137 del_timer(&local->link_timer);
1138 queue_work(system_nrt_wq, &local->rx_work); 1138 schedule_work(&local->rx_work);
1139 1139
1140 return 0; 1140 return 0;
1141} 1141}
@@ -1170,7 +1170,7 @@ void nfc_llcp_mac_is_up(struct nfc_dev *dev, u32 target_idx,
1170 if (rf_mode == NFC_RF_INITIATOR) { 1170 if (rf_mode == NFC_RF_INITIATOR) {
1171 pr_debug("Queueing Tx work\n"); 1171 pr_debug("Queueing Tx work\n");
1172 1172
1173 queue_work(system_nrt_wq, &local->tx_work); 1173 schedule_work(&local->tx_work);
1174 } else { 1174 } else {
1175 mod_timer(&local->link_timer, 1175 mod_timer(&local->link_timer,
1176 jiffies + msecs_to_jiffies(local->remote_lto)); 1176 jiffies + msecs_to_jiffies(local->remote_lto));