diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-03-04 16:43:14 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-03-04 16:43:14 +0100 |
commit | 4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b (patch) | |
tree | dce4520f69b3124da7afa76c2bbe5fc1f08313f7 /protocols | |
parent | 195c28f3074486165b6e0935362810f8a1fb9531 (diff) | |
download | pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.gz pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.bz2 pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.xz pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.zip |
RPM generation
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/software.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/software.c b/protocols/software.c index 5b217d4..ca15d8d 100644 --- a/protocols/software.c +++ b/protocols/software.c @@ -21,7 +21,7 @@ typedef struct pcilib_software_register_bank_context_s pcilib_software_register_ struct pcilib_software_register_bank_context_s { pcilib_register_bank_context_t bank_ctx; /**< the bank context associated with the software registers */ pcilib_kmem_handle_t *kmem; /**< the kernel memory for software registers */ - void *addr; /**< the virtual adress of the allocated kernel memory*/ + volatile void *addr; /**< the virtual adress of the allocated kernel memory*/ }; void pcilib_software_registers_close(pcilib_t *ctx, pcilib_register_bank_context_t *bank_ctx) { @@ -131,7 +131,7 @@ int pcilib_software_registers_read(pcilib_t *ctx, pcilib_register_bank_context_t return PCILIB_ERROR_INVALID_ADDRESS; } - pcilib_datacpy(&val, ((pcilib_software_register_bank_context_t*)bank_ctx)->addr + addr, access, 1, b->raw_endianess); + pcilib_datacpy(&val, (void*)((pcilib_software_register_bank_context_t*)bank_ctx)->addr + addr, access, 1, b->raw_endianess); *value = val; return 0; @@ -147,7 +147,7 @@ int pcilib_software_registers_write(pcilib_t *ctx, pcilib_register_bank_context_ } // we consider this atomic operation and, therefore, do no locking - pcilib_datacpy(((pcilib_software_register_bank_context_t*)bank_ctx)->addr + addr, &value, access, 1, b->raw_endianess); + pcilib_datacpy((void*)((pcilib_software_register_bank_context_t*)bank_ctx)->addr + addr, &value, access, 1, b->raw_endianess); return 0; } |