summaryrefslogtreecommitdiffstats
path: root/driver/common.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-18 00:58:02 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-18 00:58:02 +0200
commit71c759e3fa6fb725c51e3800947848cd549222bf (patch)
tree3ed1cdbfd3045d21bc74e76d69b759e1bbb9e1fb /driver/common.h
parent1f133e363c89e736a4221a3dda800e90a706056a (diff)
downloadpcitool-71c759e3fa6fb725c51e3800947848cd549222bf.tar.gz
pcitool-71c759e3fa6fb725c51e3800947848cd549222bf.tar.bz2
pcitool-71c759e3fa6fb725c51e3800947848cd549222bf.tar.xz
pcitool-71c759e3fa6fb725c51e3800947848cd549222bf.zip
Prevent driver holding hardware locks from unloading
Diffstat (limited to 'driver/common.h')
-rw-r--r--driver/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/common.h b/driver/common.h
index 3d26a97..5de501c 100644
--- a/driver/common.h
+++ b/driver/common.h
@@ -71,9 +71,13 @@ typedef struct {
atomic_t umem_count; /* id for next umem entry */
int msi_mode; /* Flag specifying if interrupt have been initialized in MSI mode */
+ atomic_t refs; /* Reference counter */
} pcidriver_privdata_t;
+void pcidriver_module_get(pcidriver_privdata_t *privdata);
+void pcidriver_module_put(pcidriver_privdata_t *privdata);
+
/*************************************************************************/
/* Some nice defines that make code more readable */
/* This is to print nice info in the log */