Skip to content

Commit aff8e8d

Browse files
Allen PaisKalle Valo
authored andcommitted
qtnfmac: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200817090637.26887-14-allen.cryptic@gmail.com
1 parent 51c41aa commit aff8e8d

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,9 +1091,9 @@ static void qtnf_pearl_fw_work_handler(struct work_struct *work)
10911091
put_device(&pdev->dev);
10921092
}
10931093

1094-
static void qtnf_pearl_reclaim_tasklet_fn(unsigned long data)
1094+
static void qtnf_pearl_reclaim_tasklet_fn(struct tasklet_struct *t)
10951095
{
1096-
struct qtnf_pcie_pearl_state *ps = (void *)data;
1096+
struct qtnf_pcie_pearl_state *ps = from_tasklet(ps, t, base.reclaim_tq);
10971097

10981098
qtnf_pearl_data_tx_reclaim(ps);
10991099
qtnf_en_txdone_irq(ps);
@@ -1145,8 +1145,7 @@ static int qtnf_pcie_pearl_probe(struct qtnf_bus *bus, unsigned int tx_bd_size,
11451145
return ret;
11461146
}
11471147

1148-
tasklet_init(&ps->base.reclaim_tq, qtnf_pearl_reclaim_tasklet_fn,
1149-
(unsigned long)ps);
1148+
tasklet_setup(&ps->base.reclaim_tq, qtnf_pearl_reclaim_tasklet_fn);
11501149
netif_napi_add(&bus->mux_dev, &bus->mux_napi,
11511150
qtnf_pcie_pearl_rx_poll, 10);
11521151

‎drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,9 +1105,9 @@ static void qtnf_topaz_fw_work_handler(struct work_struct *work)
11051105
put_device(&pdev->dev);
11061106
}
11071107

1108-
static void qtnf_reclaim_tasklet_fn(unsigned long data)
1108+
static void qtnf_reclaim_tasklet_fn(struct tasklet_struct *t)
11091109
{
1110-
struct qtnf_pcie_topaz_state *ts = (void *)data;
1110+
struct qtnf_pcie_topaz_state *ts = from_tasklet(ts, t, base.reclaim_tq);
11111111

11121112
qtnf_topaz_data_tx_reclaim(ts);
11131113
}
@@ -1158,8 +1158,7 @@ static int qtnf_pcie_topaz_probe(struct qtnf_bus *bus,
11581158
return ret;
11591159
}
11601160

1161-
tasklet_init(&ts->base.reclaim_tq, qtnf_reclaim_tasklet_fn,
1162-
(unsigned long)ts);
1161+
tasklet_setup(&ts->base.reclaim_tq, qtnf_reclaim_tasklet_fn);
11631162
netif_napi_add(&bus->mux_dev, &bus->mux_napi,
11641163
qtnf_topaz_rx_poll, 10);
11651164

0 commit comments

Comments
 (0)