summaryrefslogtreecommitdiffstats
path: root/pcilib/kmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/kmem.c')
-rw-r--r--pcilib/kmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pcilib/kmem.c b/pcilib/kmem.c
index 469c63a..b1d2c5c 100644
--- a/pcilib/kmem.c
+++ b/pcilib/kmem.c
@@ -80,7 +80,7 @@ pcilib_kmem_handle_t *pcilib_alloc_kernel_memory(pcilib_t *ctx, pcilib_kmem_type
memset(kbuf, 0, sizeof(pcilib_kmem_list_t) + nmemb * sizeof(pcilib_kmem_addr_t));
- err = pcilib_lock(ctx->locks.mmap);
+ err = pcilib_lock_global(ctx);
if (err) {
pcilib_error("Error (%i) acquiring mmap lock", err);
return NULL;
@@ -88,7 +88,7 @@ pcilib_kmem_handle_t *pcilib_alloc_kernel_memory(pcilib_t *ctx, pcilib_kmem_type
ret = ioctl( ctx->handle, PCIDRIVER_IOC_MMAP_MODE, PCIDRIVER_MMAP_KMEM );
if (ret) {
- pcilib_unlock(ctx->locks.mmap);
+ pcilib_unlock_global(ctx);
pcilib_error("PCIDRIVER_IOC_MMAP_MODE ioctl have failed");
return NULL;
}
@@ -176,7 +176,7 @@ pcilib_kmem_handle_t *pcilib_alloc_kernel_memory(pcilib_t *ctx, pcilib_kmem_type
kbuf->buf.blocks[i].mmap_offset = kh.pa & ctx->page_mask;
}
- pcilib_unlock(ctx->locks.mmap);
+ pcilib_unlock_global(ctx);
//This is possible in the case of error (nothing is allocated yet) or if buffers are not reused