[PATCH] drivers: vme: convert tasklets to use new tasklet_setup() API
From: Allen Pais
Date: Mon Aug 17 2020 - 05:18:32 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/vme/bridges/vme_fake.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/vme/bridges/vme_fake.c b/drivers/vme/bridges/vme_fake.c
index 6a1bc284f297..38dd5f949cd0 100644
--- a/drivers/vme/bridges/vme_fake.c
+++ b/drivers/vme/bridges/vme_fake.c
@@ -90,13 +90,13 @@ static struct device *vme_root;
/*
* Calling VME bus interrupt callback if provided.
*/
-static void fake_VIRQ_tasklet(unsigned long data)
+static void fake_VIRQ_tasklet(struct tasklet_struct *t)
{
struct vme_bridge *fake_bridge;
struct fake_driver *bridge;
- fake_bridge = (struct vme_bridge *) data;
- bridge = fake_bridge->driver_priv;
+ bridge = from_tasklet(bridge, t, int_tasklet);
+ fake_bridge = bridge->parent;
vme_irq_handler(fake_bridge, bridge->int_level, bridge->int_statid);
}
@@ -1098,8 +1098,7 @@ static int __init fake_init(void)
/* Initialize wait queues & mutual exclusion flags */
mutex_init(&fake_device->vme_int);
mutex_init(&fake_bridge->irq_mtx);
- tasklet_init(&fake_device->int_tasklet, fake_VIRQ_tasklet,
- (unsigned long) fake_bridge);
+ tasklet_setup(&fake_device->int_tasklet, fake_VIRQ_tasklet);
strcpy(fake_bridge->name, driver_name);
--
2.17.1