@@ -17,11 +17,12 @@
#define DRV_NAME "octeontx-cptvf"
#define DRV_VERSION "1.0"
-static void vq_work_handler(unsigned long data)
+static void vq_work_handler(struct tasklet_struct *t)
{
- struct otx_cptvf_wqe_info *cwqe_info =
- (struct otx_cptvf_wqe_info *) data;
-
+ struct otx_cptvf_wqe *cwqe = from_tasklet(cwqe, t, twork);
+ struct otx_cptvf_wqe_info *cwqe_info = container_of(cwqe,
+ typeof(*cwqe_info),
+ vq_wqe[0]);
otx_cpt_post_process(&cwqe_info->vq_wqe[0]);
}
@@ -41,8 +42,7 @@ static int init_worker_threads(struct otx_cptvf *cptvf)
}
for (i = 0; i < cptvf->num_queues; i++) {
- tasklet_init(&cwqe_info->vq_wqe[i].twork, vq_work_handler,
- (u64)cwqe_info);
+ tasklet_setup(&cwqe_info->vq_wqe[i].twork, vq_work_handler);
cwqe_info->vq_wqe[i].cptvf = cptvf;
}
cptvf->wqe_info = cwqe_info;