[PATCH 1/2] misc: ibmvmc: convert tasklets to use new tasklet_setup() API

From: Allen Pais
Date: Mon Aug 17 2020 - 05:20:07 EST


From: Allen Pais <allen.lkml@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Allen Pais <allen.lkml@xxxxxxxxx>
---
drivers/misc/ibmvmc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c
index 2d778d0f011e..347278c1a5e4 100644
--- a/drivers/misc/ibmvmc.c
+++ b/drivers/misc/ibmvmc.c
@@ -2064,10 +2064,10 @@ static void ibmvmc_handle_crq(struct ibmvmc_crq_msg *crq,
}
}

-static void ibmvmc_task(unsigned long data)
+static void ibmvmc_task(struct tasklet_struct *t)
{
- struct crq_server_adapter *adapter =
- (struct crq_server_adapter *)data;
+ struct crq_server_adapter *adapter = from_tasklet(adapter, t,
+ work_task);
struct vio_dev *vdev = to_vio_dev(adapter->dev);
struct ibmvmc_crq_msg *crq;
int done = 0;
@@ -2150,7 +2150,7 @@ static int ibmvmc_init_crq_queue(struct crq_server_adapter *adapter)
queue->cur = 0;
spin_lock_init(&queue->lock);

- tasklet_init(&adapter->work_task, ibmvmc_task, (unsigned long)adapter);
+ tasklet_setup(&adapter->work_task, ibmvmc_task);

if (request_irq(vdev->irq,
ibmvmc_handle_event,
--
2.17.1