Commit aff8e8d0 authored by Allen Pais's avatar Allen Pais Committed by Kalle Valo

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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200817090637.26887-14-allen.cryptic@gmail.com
parent 51c41aa9
...@@ -1091,9 +1091,9 @@ static void qtnf_pearl_fw_work_handler(struct work_struct *work) ...@@ -1091,9 +1091,9 @@ static void qtnf_pearl_fw_work_handler(struct work_struct *work)
put_device(&pdev->dev); put_device(&pdev->dev);
} }
static void qtnf_pearl_reclaim_tasklet_fn(unsigned long data) static void qtnf_pearl_reclaim_tasklet_fn(struct tasklet_struct *t)
{ {
struct qtnf_pcie_pearl_state *ps = (void *)data; struct qtnf_pcie_pearl_state *ps = from_tasklet(ps, t, base.reclaim_tq);
qtnf_pearl_data_tx_reclaim(ps); qtnf_pearl_data_tx_reclaim(ps);
qtnf_en_txdone_irq(ps); qtnf_en_txdone_irq(ps);
...@@ -1145,8 +1145,7 @@ static int qtnf_pcie_pearl_probe(struct qtnf_bus *bus, unsigned int tx_bd_size, ...@@ -1145,8 +1145,7 @@ static int qtnf_pcie_pearl_probe(struct qtnf_bus *bus, unsigned int tx_bd_size,
return ret; return ret;
} }
tasklet_init(&ps->base.reclaim_tq, qtnf_pearl_reclaim_tasklet_fn, tasklet_setup(&ps->base.reclaim_tq, qtnf_pearl_reclaim_tasklet_fn);
(unsigned long)ps);
netif_napi_add(&bus->mux_dev, &bus->mux_napi, netif_napi_add(&bus->mux_dev, &bus->mux_napi,
qtnf_pcie_pearl_rx_poll, 10); qtnf_pcie_pearl_rx_poll, 10);
......
...@@ -1105,9 +1105,9 @@ static void qtnf_topaz_fw_work_handler(struct work_struct *work) ...@@ -1105,9 +1105,9 @@ static void qtnf_topaz_fw_work_handler(struct work_struct *work)
put_device(&pdev->dev); put_device(&pdev->dev);
} }
static void qtnf_reclaim_tasklet_fn(unsigned long data) static void qtnf_reclaim_tasklet_fn(struct tasklet_struct *t)
{ {
struct qtnf_pcie_topaz_state *ts = (void *)data; struct qtnf_pcie_topaz_state *ts = from_tasklet(ts, t, base.reclaim_tq);
qtnf_topaz_data_tx_reclaim(ts); qtnf_topaz_data_tx_reclaim(ts);
} }
...@@ -1158,8 +1158,7 @@ static int qtnf_pcie_topaz_probe(struct qtnf_bus *bus, ...@@ -1158,8 +1158,7 @@ static int qtnf_pcie_topaz_probe(struct qtnf_bus *bus,
return ret; return ret;
} }
tasklet_init(&ts->base.reclaim_tq, qtnf_reclaim_tasklet_fn, tasklet_setup(&ts->base.reclaim_tq, qtnf_reclaim_tasklet_fn);
(unsigned long)ts);
netif_napi_add(&bus->mux_dev, &bus->mux_napi, netif_napi_add(&bus->mux_dev, &bus->mux_napi,
qtnf_topaz_rx_poll, 10); qtnf_topaz_rx_poll, 10);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment