mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
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>
This commit is contained in:
parent
aecdc33e11
commit
916082b073
@ -718,7 +718,7 @@ static int __devexit mrf24j40_remove(struct spi_device *spi)
|
|||||||
dev_dbg(printdev(devrec), "remove\n");
|
dev_dbg(printdev(devrec), "remove\n");
|
||||||
|
|
||||||
free_irq(spi->irq, devrec);
|
free_irq(spi->irq, devrec);
|
||||||
flush_work_sync(&devrec->irqwork); /* TODO: Is this the right call? */
|
flush_work(&devrec->irqwork); /* TODO: Is this the right call? */
|
||||||
ieee802154_unregister_device(devrec->dev);
|
ieee802154_unregister_device(devrec->dev);
|
||||||
ieee802154_free_device(devrec->dev);
|
ieee802154_free_device(devrec->dev);
|
||||||
/* TODO: Will ieee802154_free_device() wait until ->xmit() is
|
/* TODO: Will ieee802154_free_device() wait until ->xmit() is
|
||||||
|
@ -715,7 +715,7 @@ static void nfc_check_pres_timeout(unsigned long data)
|
|||||||
{
|
{
|
||||||
struct nfc_dev *dev = (struct nfc_dev *)data;
|
struct nfc_dev *dev = (struct nfc_dev *)data;
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &dev->check_pres_work);
|
schedule_work(&dev->check_pres_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct class nfc_class = {
|
struct class nfc_class = {
|
||||||
|
@ -141,7 +141,7 @@ static void __nfc_hci_cmd_completion(struct nfc_hci_dev *hdev, int err,
|
|||||||
kfree(hdev->cmd_pending_msg);
|
kfree(hdev->cmd_pending_msg);
|
||||||
hdev->cmd_pending_msg = NULL;
|
hdev->cmd_pending_msg = NULL;
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &hdev->msg_tx_work);
|
schedule_work(&hdev->msg_tx_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nfc_hci_resp_received(struct nfc_hci_dev *hdev, u8 result,
|
void nfc_hci_resp_received(struct nfc_hci_dev *hdev, u8 result,
|
||||||
@ -326,7 +326,7 @@ static void nfc_hci_cmd_timeout(unsigned long data)
|
|||||||
{
|
{
|
||||||
struct nfc_hci_dev *hdev = (struct nfc_hci_dev *)data;
|
struct nfc_hci_dev *hdev = (struct nfc_hci_dev *)data;
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &hdev->msg_tx_work);
|
schedule_work(&hdev->msg_tx_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hci_dev_connect_gates(struct nfc_hci_dev *hdev, u8 gate_count,
|
static 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)
|
|||||||
nfc_hci_hcp_message_rx(hdev, pipe, type, instruction, hcp_skb);
|
nfc_hci_hcp_message_rx(hdev, pipe, type, instruction, hcp_skb);
|
||||||
} else {
|
} else {
|
||||||
skb_queue_tail(&hdev->msg_rx_queue, hcp_skb);
|
skb_queue_tail(&hdev->msg_rx_queue, hcp_skb);
|
||||||
queue_work(system_nrt_wq, &hdev->msg_rx_work);
|
schedule_work(&hdev->msg_rx_work);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe,
|
|||||||
list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue);
|
list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue);
|
||||||
mutex_unlock(&hdev->msg_tx_mutex);
|
mutex_unlock(&hdev->msg_tx_mutex);
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &hdev->msg_tx_work);
|
schedule_work(&hdev->msg_tx_work);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ static void llc_shdlc_connect_timeout(unsigned long data)
|
|||||||
|
|
||||||
pr_debug("\n");
|
pr_debug("\n");
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void llc_shdlc_t1_timeout(unsigned long data)
|
static void llc_shdlc_t1_timeout(unsigned long data)
|
||||||
@ -597,7 +597,7 @@ static void llc_shdlc_t1_timeout(unsigned long data)
|
|||||||
|
|
||||||
pr_debug("SoftIRQ: need to send ack\n");
|
pr_debug("SoftIRQ: need to send ack\n");
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void llc_shdlc_t2_timeout(unsigned long data)
|
static void llc_shdlc_t2_timeout(unsigned long data)
|
||||||
@ -606,7 +606,7 @@ static void llc_shdlc_t2_timeout(unsigned long data)
|
|||||||
|
|
||||||
pr_debug("SoftIRQ: need to retransmit\n");
|
pr_debug("SoftIRQ: need to retransmit\n");
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void llc_shdlc_sm_work(struct work_struct *work)
|
static void llc_shdlc_sm_work(struct work_struct *work)
|
||||||
@ -646,7 +646,7 @@ static void llc_shdlc_sm_work(struct work_struct *work)
|
|||||||
case SHDLC_NEGOTIATING:
|
case SHDLC_NEGOTIATING:
|
||||||
if (timer_pending(&shdlc->connect_timer) == 0) {
|
if (timer_pending(&shdlc->connect_timer) == 0) {
|
||||||
shdlc->state = SHDLC_CONNECTING;
|
shdlc->state = SHDLC_CONNECTING;
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
llc_shdlc_handle_rcv_queue(shdlc);
|
llc_shdlc_handle_rcv_queue(shdlc);
|
||||||
@ -711,7 +711,7 @@ static int llc_shdlc_connect(struct llc_shdlc *shdlc)
|
|||||||
|
|
||||||
mutex_unlock(&shdlc->state_mutex);
|
mutex_unlock(&shdlc->state_mutex);
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
|
|
||||||
wait_event(connect_wq, shdlc->connect_result != 1);
|
wait_event(connect_wq, shdlc->connect_result != 1);
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ static void llc_shdlc_disconnect(struct llc_shdlc *shdlc)
|
|||||||
|
|
||||||
mutex_unlock(&shdlc->state_mutex);
|
mutex_unlock(&shdlc->state_mutex);
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -746,7 +746,7 @@ static void llc_shdlc_recv_frame(struct llc_shdlc *shdlc, struct sk_buff *skb)
|
|||||||
skb_queue_tail(&shdlc->rcv_q, skb);
|
skb_queue_tail(&shdlc->rcv_q, skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv,
|
static 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)
|
|||||||
|
|
||||||
skb_queue_tail(&shdlc->send_q, skb);
|
skb_queue_tail(&shdlc->send_q, skb);
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &shdlc->sm_work);
|
schedule_work(&shdlc->sm_work);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ static void nfc_llcp_symm_timer(unsigned long data)
|
|||||||
|
|
||||||
pr_err("SYMM timeout\n");
|
pr_err("SYMM timeout\n");
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &local->timeout_work);
|
schedule_work(&local->timeout_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev)
|
struct 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)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &local->tx_work);
|
schedule_work(&local->tx_work);
|
||||||
kfree_skb(local->rx_pending);
|
kfree_skb(local->rx_pending);
|
||||||
local->rx_pending = NULL;
|
local->rx_pending = NULL;
|
||||||
|
|
||||||
@ -1120,7 +1120,7 @@ void nfc_llcp_recv(void *data, struct sk_buff *skb, int err)
|
|||||||
|
|
||||||
local->rx_pending = skb_get(skb);
|
local->rx_pending = skb_get(skb);
|
||||||
del_timer(&local->link_timer);
|
del_timer(&local->link_timer);
|
||||||
queue_work(system_nrt_wq, &local->rx_work);
|
schedule_work(&local->rx_work);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1135,7 +1135,7 @@ int nfc_llcp_data_received(struct nfc_dev *dev, struct sk_buff *skb)
|
|||||||
|
|
||||||
local->rx_pending = skb_get(skb);
|
local->rx_pending = skb_get(skb);
|
||||||
del_timer(&local->link_timer);
|
del_timer(&local->link_timer);
|
||||||
queue_work(system_nrt_wq, &local->rx_work);
|
schedule_work(&local->rx_work);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1170,7 +1170,7 @@ void nfc_llcp_mac_is_up(struct nfc_dev *dev, u32 target_idx,
|
|||||||
if (rf_mode == NFC_RF_INITIATOR) {
|
if (rf_mode == NFC_RF_INITIATOR) {
|
||||||
pr_debug("Queueing Tx work\n");
|
pr_debug("Queueing Tx work\n");
|
||||||
|
|
||||||
queue_work(system_nrt_wq, &local->tx_work);
|
schedule_work(&local->tx_work);
|
||||||
} else {
|
} else {
|
||||||
mod_timer(&local->link_timer,
|
mod_timer(&local->link_timer,
|
||||||
jiffies + msecs_to_jiffies(local->remote_lto));
|
jiffies + msecs_to_jiffies(local->remote_lto));
|
||||||
|
Loading…
Reference in New Issue
Block a user