misc/iwmc3200top: use system_wq instead of dedicated workqueues
With cmwq, there's no reason to use separate workqueues in iwmc3200top. Drop them and use system_wq instead. The used work items are sync flushed before driver detach. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Tomas Winkler <tomas.winkler@intel.com>
This commit is contained in:
@@ -183,9 +183,7 @@ struct iwmct_priv {
|
|||||||
u32 barker;
|
u32 barker;
|
||||||
struct iwmct_dbg dbg;
|
struct iwmct_dbg dbg;
|
||||||
|
|
||||||
/* drivers work queue */
|
/* drivers work items */
|
||||||
struct workqueue_struct *wq;
|
|
||||||
struct workqueue_struct *bus_rescan_wq;
|
|
||||||
struct work_struct bus_rescan_worker;
|
struct work_struct bus_rescan_worker;
|
||||||
struct work_struct isr_worker;
|
struct work_struct isr_worker;
|
||||||
|
|
||||||
|
@@ -89,7 +89,7 @@ static void op_top_message(struct iwmct_priv *priv, struct top_msg *msg)
|
|||||||
switch (msg->hdr.opcode) {
|
switch (msg->hdr.opcode) {
|
||||||
case OP_OPR_ALIVE:
|
case OP_OPR_ALIVE:
|
||||||
LOG_INFO(priv, FW_MSG, "Got ALIVE from device, wake rescan\n");
|
LOG_INFO(priv, FW_MSG, "Got ALIVE from device, wake rescan\n");
|
||||||
queue_work(priv->bus_rescan_wq, &priv->bus_rescan_worker);
|
schedule_work(&priv->bus_rescan_worker);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_INFO(priv, FW_MSG, "Received msg opcode 0x%X\n",
|
LOG_INFO(priv, FW_MSG, "Received msg opcode 0x%X\n",
|
||||||
@@ -360,7 +360,7 @@ static void iwmct_irq(struct sdio_func *func)
|
|||||||
/* clear the function's interrupt request bit (write 1 to clear) */
|
/* clear the function's interrupt request bit (write 1 to clear) */
|
||||||
sdio_writeb(func, 1, IWMC_SDIO_INTR_CLEAR_ADDR, &ret);
|
sdio_writeb(func, 1, IWMC_SDIO_INTR_CLEAR_ADDR, &ret);
|
||||||
|
|
||||||
queue_work(priv->wq, &priv->isr_worker);
|
schedule_work(&priv->isr_worker);
|
||||||
|
|
||||||
LOG_TRACE(priv, IRQ, "exit iwmct_irq\n");
|
LOG_TRACE(priv, IRQ, "exit iwmct_irq\n");
|
||||||
|
|
||||||
@@ -506,10 +506,6 @@ static int iwmct_probe(struct sdio_func *func,
|
|||||||
priv->func = func;
|
priv->func = func;
|
||||||
sdio_set_drvdata(func, priv);
|
sdio_set_drvdata(func, priv);
|
||||||
|
|
||||||
|
|
||||||
/* create drivers work queue */
|
|
||||||
priv->wq = create_workqueue(DRV_NAME "_wq");
|
|
||||||
priv->bus_rescan_wq = create_workqueue(DRV_NAME "_rescan_wq");
|
|
||||||
INIT_WORK(&priv->bus_rescan_worker, iwmct_rescan_worker);
|
INIT_WORK(&priv->bus_rescan_worker, iwmct_rescan_worker);
|
||||||
INIT_WORK(&priv->isr_worker, iwmct_irq_read_worker);
|
INIT_WORK(&priv->isr_worker, iwmct_irq_read_worker);
|
||||||
|
|
||||||
@@ -604,9 +600,9 @@ static void iwmct_remove(struct sdio_func *func)
|
|||||||
sdio_release_irq(func);
|
sdio_release_irq(func);
|
||||||
sdio_release_host(func);
|
sdio_release_host(func);
|
||||||
|
|
||||||
/* Safely destroy osc workqueue */
|
/* Make sure works are finished */
|
||||||
destroy_workqueue(priv->bus_rescan_wq);
|
flush_work_sync(&priv->bus_rescan_worker);
|
||||||
destroy_workqueue(priv->wq);
|
flush_work_sync(&priv->isr_worker);
|
||||||
|
|
||||||
sdio_claim_host(func);
|
sdio_claim_host(func);
|
||||||
sdio_disable_func(func);
|
sdio_disable_func(func);
|
||||||
|
Reference in New Issue
Block a user