summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/capi/capifs.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2010-02-08 10:12:06 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-16 16:01:18 -0800
commit90926f0e58dcd9f4ca877961000568a3be787f2f (patch)
treed3c589a3debf2f692c5f5a7643a78b7f20cb7a60 /drivers/isdn/capi/capifs.h
parentc947862f9126983537a4cc11e07d26882d60b7e7 (diff)
downloadblackbird-op-linux-90926f0e58dcd9f4ca877961000568a3be787f2f.tar.gz
blackbird-op-linux-90926f0e58dcd9f4ca877961000568a3be787f2f.zip
CAPI: Sanitize capifs API
Instead of looking up the dentry of an NCCI node again in capifs_free_ncci pass the pointer via the capifs user. This patch also reduces the #ifdef mess in capi.c a bit as far as capifs was causing it. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/capi/capifs.h')
-rw-r--r--drivers/isdn/capi/capifs.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/isdn/capi/capifs.h b/drivers/isdn/capi/capifs.h
index d0bd4c3c430a..e193d1189531 100644
--- a/drivers/isdn/capi/capifs.h
+++ b/drivers/isdn/capi/capifs.h
@@ -7,5 +7,22 @@
*
*/
-void capifs_new_ncci(unsigned int num, dev_t device);
-void capifs_free_ncci(unsigned int num);
+#include <linux/dcache.h>
+
+#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
+
+struct dentry *capifs_new_ncci(unsigned int num, dev_t device);
+void capifs_free_ncci(struct dentry *dentry);
+
+#else
+
+static inline struct dentry *capifs_new_ncci(unsigned int num, dev_t device)
+{
+ return NULL;
+}
+
+static inline void capifs_free_ncci(struct dentry *dentry)
+{
+}
+
+#endif
OpenPOWER on IntegriCloud