diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-08-05 00:53:30 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-08-05 00:53:30 +0200 |
commit | 8f5fb3a23bd0adcd4d0d021fdda571d3b3761bba (patch) | |
tree | 794ef1f923fc24a04220eb1098dadb75a4c4b433 | |
parent | b05d6147eb4ccc7527a806506c2154c7795487f6 (diff) | |
download | pcitool-8f5fb3a23bd0adcd4d0d021fdda571d3b3761bba.tar.gz pcitool-8f5fb3a23bd0adcd4d0d021fdda571d3b3761bba.tar.bz2 pcitool-8f5fb3a23bd0adcd4d0d021fdda571d3b3761bba.tar.xz pcitool-8f5fb3a23bd0adcd4d0d021fdda571d3b3761bba.zip |
Use bank addresses as kernel memory subtypes of software registers instead of indexes in array
-rw-r--r-- | protocols/software.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/software.c b/protocols/software.c index 5534dc7..e1339a6 100644 --- a/protocols/software.c +++ b/protocols/software.c @@ -53,7 +53,7 @@ pcilib_register_bank_context_t* pcilib_software_registers_open(pcilib_t *ctx, pc bank_ctx = calloc(1, sizeof(pcilib_software_register_bank_context_t)); - handle = pcilib_alloc_kernel_memory(ctx, PCILIB_KMEM_TYPE_PAGE, 1, PCILIB_KMEM_PAGE_SIZE, 0, PCILIB_KMEM_USE(PCILIB_KMEM_USE_SOFTWARE_REGISTERS, bank), PCILIB_KMEM_FLAG_REUSE|PCILIB_KMEM_FLAG_PERSISTENT); + handle = pcilib_alloc_kernel_memory(ctx, PCILIB_KMEM_TYPE_PAGE, 1, PCILIB_KMEM_PAGE_SIZE, 0, PCILIB_KMEM_USE(PCILIB_KMEM_USE_SOFTWARE_REGISTERS, bank_desc->addr), PCILIB_KMEM_FLAG_REUSE|PCILIB_KMEM_FLAG_PERSISTENT); if (!handle) { pcilib_error("Allocation of kernel memory for software registers has failed"); pcilib_software_registers_close(ctx, (pcilib_register_bank_context_t*)bank_ctx); |