}
 }
 
-static void bnxt_qplib_service_nq(unsigned long data)
+static void bnxt_qplib_service_nq(struct tasklet_struct *t)
 {
-       struct bnxt_qplib_nq *nq = (struct bnxt_qplib_nq *)data;
+       struct bnxt_qplib_nq *nq = from_tasklet(nq, t, nq_tasklet);
        struct bnxt_qplib_hwq *hwq = &nq->hwq;
        int num_srqne_processed = 0;
        int num_cqne_processed = 0;
 
        nq->msix_vec = msix_vector;
        if (need_init)
-               tasklet_init(&nq->nq_tasklet, bnxt_qplib_service_nq,
-                            (unsigned long)nq);
+               tasklet_setup(&nq->nq_tasklet, bnxt_qplib_service_nq);
        else
                tasklet_enable(&nq->nq_tasklet);
 
 
 #include "qplib_sp.h"
 #include "qplib_fp.h"
 
-static void bnxt_qplib_service_creq(unsigned long data);
+static void bnxt_qplib_service_creq(struct tasklet_struct *t);
 
 /* Hardware communication channel */
 static int __wait_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie)
                goto done;
        do {
                mdelay(1); /* 1m sec */
-               bnxt_qplib_service_creq((unsigned long)rcfw);
+               bnxt_qplib_service_creq(&rcfw->creq.creq_tasklet);
        } while (test_bit(cbit, cmdq->cmdq_bitmap) && --count);
 done:
        return count ? 0 : -ETIMEDOUT;
 }
 
 /* SP - CREQ Completion handlers */
-static void bnxt_qplib_service_creq(unsigned long data)
+static void bnxt_qplib_service_creq(struct tasklet_struct *t)
 {
-       struct bnxt_qplib_rcfw *rcfw = (struct bnxt_qplib_rcfw *)data;
+       struct bnxt_qplib_rcfw *rcfw = from_tasklet(rcfw, t, creq.creq_tasklet);
        struct bnxt_qplib_creq_ctx *creq = &rcfw->creq;
        u32 type, budget = CREQ_ENTRY_POLL_BUDGET;
        struct bnxt_qplib_hwq *hwq = &creq->hwq;
 
        creq->msix_vec = msix_vector;
        if (need_init)
-               tasklet_init(&creq->creq_tasklet,
-                            bnxt_qplib_service_creq, (unsigned long)rcfw);
+               tasklet_setup(&creq->creq_tasklet, bnxt_qplib_service_creq);
        else
                tasklet_enable(&creq->creq_tasklet);
        rc = request_irq(creq->msix_vec, bnxt_qplib_creq_irq, 0,