mutex_unlock(&pai_reserve_mutex);
 }
 
-static u64 paicrypt_getctr(struct paicrypt_map *cpump, int nr, bool kernel)
+static u64 paicrypt_getctr(unsigned long *page, int nr, bool kernel)
 {
        if (kernel)
                nr += PAI_CRYPTO_MAXCTR;
-       return cpump->page[nr];
+       return page[nr];
 }
 
 /* Read the counter values. Return value from location in CMP. For event
        int i;
 
        if (event->attr.config != PAI_CRYPTO_BASE) {
-               return paicrypt_getctr(cpump,
+               return paicrypt_getctr(cpump->page,
                                       event->attr.config - PAI_CRYPTO_BASE,
                                       kernel);
        }
 
        for (i = 1; i <= paicrypt_cnt; i++) {
-               u64 val = paicrypt_getctr(cpump, i, kernel);
+               u64 val = paicrypt_getctr(cpump->page, i, kernel);
 
                if (!val)
                        continue;
                u64 val = 0;
 
                if (!exclude_kernel)
-                       val += paicrypt_getctr(cpump, i, true);
+                       val += paicrypt_getctr(cpump->page, i, true);
                if (!exclude_user)
-                       val += paicrypt_getctr(cpump, i, false);
+                       val += paicrypt_getctr(cpump->page, i, false);
                if (val) {
                        userdata[outidx].num = i;
                        userdata[outidx].value = val;
 
        return 0;
 }
 
-static u64 paiext_getctr(struct paiext_map *cpump, int nr)
+static u64 paiext_getctr(unsigned long *area, int nr)
 {
-       return cpump->area[nr];
+       return area[nr];
 }
 
 /* Read the counter values. Return value from location in buffer. For event
        int i;
 
        if (event->attr.config != PAI_NNPA_BASE)
-               return paiext_getctr(cpump, event->attr.config - PAI_NNPA_BASE);
+               return paiext_getctr(cpump->area,
+                                    event->attr.config - PAI_NNPA_BASE);
 
        for (i = 1; i <= paiext_cnt; i++)
-               sum += paiext_getctr(cpump, i);
+               sum += paiext_getctr(cpump->area, i);
 
        return sum;
 }
        int i, outidx = 0;
 
        for (i = 1; i <= paiext_cnt; i++) {
-               u64 val = paiext_getctr(cpump, i);
+               u64 val = paiext_getctr(cpump->area, i);
 
                if (val) {
                        userdata[outidx].num = i;