summaryrefslogtreecommitdiffstats
path: root/pci.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-14 06:01:27 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-14 06:01:27 +0200
commitf4ad2df2209acac66f3df47d847f1f714283feab (patch)
tree23da0368acbb6c15cdebd2a35808cd6bbe99b8ae /pci.c
parentb492b1aac3d12683ccbc973b08b023ba0466cbec (diff)
downloadipecamera-f4ad2df2209acac66f3df47d847f1f714283feab.tar.gz
ipecamera-f4ad2df2209acac66f3df47d847f1f714283feab.tar.bz2
ipecamera-f4ad2df2209acac66f3df47d847f1f714283feab.tar.xz
ipecamera-f4ad2df2209acac66f3df47d847f1f714283feab.zip
First iteration of work to preserve DMA state between executions
Diffstat (limited to 'pci.c')
-rw-r--r--pci.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pci.c b/pci.c
index 3846235..d2d5843 100644
--- a/pci.c
+++ b/pci.c
@@ -401,8 +401,12 @@ void pcilib_close(pcilib_t *ctx) {
ctx->model_info.registers = pcilib_model[ctx->model].registers;
}
- while (ctx->kmem_list) {
- pcilib_free_kernel_memory(ctx, ctx->kmem_list);
+ if (ctx->kmem_list) {
+ pcilib_warning("Not all kernel buffers are properly cleaned");
+
+ while (ctx->kmem_list) {
+ pcilib_free_kernel_memory(ctx, ctx->kmem_list, 0);
+ }
}
for (i = 0; i < PCILIB_MAX_BANKS; i++) {